feat: screen presentation and dismiss animations for mobile (#2073)

This commit is contained in:
Mo
2022-11-30 14:37:36 -06:00
committed by GitHub
parent 0e95b451d6
commit 7f2074a6ec
79 changed files with 1338 additions and 878 deletions

View File

@@ -52,7 +52,6 @@ export class ItemListController extends AbstractViewController implements Intern
notesToDisplay = 0
pageSize = 0
panelTitle = 'Notes'
panelWidth = 0
renderedItems: ListableContentItem[] = []
searchSubmitted = false
showDisplayOptionsMenu = false
@@ -189,7 +188,6 @@ export class ItemListController extends AbstractViewController implements Intern
notes: observable,
notesToDisplay: observable,
panelTitle: observable,
panelWidth: observable,
items: observable,
renderedItems: observable,
showDisplayOptionsMenu: observable,
@@ -439,6 +437,7 @@ export class ItemListController extends AbstractViewController implements Intern
const activeController = this.getActiveItemController()
if (this.shouldLeaveSelectionUnchanged(activeController)) {
log(LoggingDomain.Selection, 'Leaving selection unchanged')
return
}
@@ -451,7 +450,7 @@ export class ItemListController extends AbstractViewController implements Intern
if (this.shouldSelectFirstItem(itemsReloadSource)) {
log(LoggingDomain.Selection, 'Selecting next item after closing active one')
this.selectionController.selectNextItem()
this.selectionController.selectNextItem({ userTriggered: false })
}
} else if (activeItem && this.shouldSelectActiveItem(activeItem)) {
log(LoggingDomain.Selection, 'Selecting active item')
@@ -460,6 +459,8 @@ export class ItemListController extends AbstractViewController implements Intern
await this.selectFirstItem()
} else if (this.shouldSelectNextItemOrCreateNewNote(activeItem)) {
await this.selectNextItemOrCreateNewNote()
} else {
log(LoggingDomain.Selection, 'No selection change')
}
}
@@ -579,13 +580,6 @@ export class ItemListController extends AbstractViewController implements Intern
this.displayOptions = newDisplayOptions
this.webDisplayOptions = newWebDisplayOptions
const listColumnWidth =
selectedTag?.preferences?.panelWidth || this.application.getPreference(PrefKey.NotesPanelWidth)
if (listColumnWidth && listColumnWidth !== this.panelWidth) {
this.panelWidth = listColumnWidth
}
if (!displayOptionsChanged) {
return { didReloadItems: false }
}