feat: add panel settings section in quick settings (#1669)

This commit is contained in:
Aman Harwara
2022-09-29 12:46:06 +05:30
committed by GitHub
parent c74fa272fb
commit 0ed692ff9b
7 changed files with 113 additions and 16 deletions

View File

@@ -188,6 +188,7 @@ export class ItemListController extends AbstractViewController implements Intern
notes: observable,
notesToDisplay: observable,
panelTitle: observable,
panelWidth: observable,
renderedItems: observable,
showDisplayOptionsMenu: observable,
@@ -453,17 +454,21 @@ export class ItemListController extends AbstractViewController implements Intern
this.displayOptions = newDisplayOptions
this.webDisplayOptions = newWebDisplayOptions
const newWidth = this.application.getPreference(PrefKey.NotesPanelWidth)
if (newWidth && newWidth !== this.panelWidth) {
this.panelWidth = newWidth
}
if (!displayOptionsChanged) {
return
}
if (displayOptionsChanged) {
this.reloadNotesDisplayOptions()
}
await this.reloadItems(ItemsReloadSource.DisplayOptionsChange)
const width = this.application.getPreference(PrefKey.NotesPanelWidth)
if (width) {
this.panelWidth = width
}
if (newDisplayOptions.sortBy !== currentSortBy) {
await this.selectFirstItem()
}