Add sortNotesChronologically.reader pref for PDF reader notes list

And default to true. I forgot we were sorting reverse chronologically by
default in order to make it easy to open recent notes.

Follow-up to https://github.com/zotero/zotero/issues/2526 for
https://forums.zotero.org/discussion/96743/pdf-reader-two-feature-requests
This commit is contained in:
Dan Stillman 2022-04-26 17:53:49 -04:00
parent 40501c3953
commit c405fa76a1
2 changed files with 2 additions and 1 deletions

View file

@ -538,7 +538,7 @@ var ZoteroContextPane = new function () {
} }
notes = await s.search(); notes = await s.search();
notes = Zotero.Items.get(notes); notes = Zotero.Items.get(notes);
if (Zotero.Prefs.get('sortNotesChronologically')) { if (Zotero.Prefs.get('sortNotesChronologically.reader')) {
notes.sort((a, b) => { notes.sort((a, b) => {
a = a.dateModified; a = a.dateModified;
b = b.dateModified; b = b.dateModified;

View file

@ -41,6 +41,7 @@ pref("extensions.zotero.attachmentRenameFormatString", "{%c - }{%y - }{%t{50}}")
pref("extensions.zotero.capitalizeTitles", false); pref("extensions.zotero.capitalizeTitles", false);
pref("extensions.zotero.launchNonNativeFiles", false); pref("extensions.zotero.launchNonNativeFiles", false);
pref("extensions.zotero.sortNotesChronologically", false); pref("extensions.zotero.sortNotesChronologically", false);
pref("extensions.zotero.sortNotesChronologically.reader", true);
pref("extensions.zotero.sortAttachmentsChronologically", false); pref("extensions.zotero.sortAttachmentsChronologically", false);
pref("extensions.zotero.showTrashWhenEmpty", true); pref("extensions.zotero.showTrashWhenEmpty", true);
pref("extensions.zotero.trashAutoEmptyDays", 30); pref("extensions.zotero.trashAutoEmptyDays", 30);