Skip to content

Commit

Permalink
Merge pull request #9040 from Snuffleupagus/rm-handToolPref-migration
Browse files Browse the repository at this point in the history
Remove the `enableHandToolOnLoad` preference migration code in `web/pdf_cursor_tools.js`
  • Loading branch information
timvandermeij authored Oct 17, 2017
2 parents 0591143 + 47448c2 commit e56bec5
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions web/pdf_cursor_tools.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,8 @@ class PDFCursorTools {

this._addEventListeners();

Promise.all([
preferences.get('cursorToolOnLoad'),
preferences.get('enableHandToolOnLoad')
]).then(([cursorToolPref, handToolPref]) => {
// If the 'cursorToolOnLoad' preference has not been set to a non-default
// value, attempt to convert the old 'enableHandToolOnLoad' preference.
// TODO: Remove this conversion after a suitable number of releases.
if (handToolPref === true) {
preferences.set('enableHandToolOnLoad', false);

if (cursorToolPref === CursorTool.SELECT) {
cursorToolPref = CursorTool.HAND;
preferences.set('cursorToolOnLoad', cursorToolPref).catch(() => { });
}
}
this.switchTool(cursorToolPref);
preferences.get('cursorToolOnLoad').then((value) => {
this.switchTool(value);
}).catch(() => { });
}

Expand Down

0 comments on commit e56bec5

Please sign in to comment.