fix: Fixed an issue where deleting a file from the preview modal would not correctly navigate to next item or dismiss the modal

This commit is contained in:
Aman Harwara
2023-03-30 12:40:50 +05:30
parent 860746d4e2
commit 7773becdec
3 changed files with 39 additions and 4 deletions

View File

@@ -51,7 +51,7 @@ export class ViewControllerManager implements InternalEventHandlerInterface {
readonly accountMenuController: AccountMenuController
readonly actionsMenuController = new ActionsMenuController()
readonly featuresController: FeaturesController
readonly filePreviewModalController = new FilePreviewModalController()
readonly filePreviewModalController: FilePreviewModalController
readonly filesController: FilesController
readonly noAccountWarningController: NoAccountWarningController
readonly notesController: NotesController
@@ -88,6 +88,8 @@ export class ViewControllerManager implements InternalEventHandlerInterface {
this.subscriptionManager = application.subscriptions
this.filePreviewModalController = new FilePreviewModalController(application)
this.quickSettingsMenuController = new QuickSettingsController(application, this.eventBus)
this.paneController = new PaneController(application, this.eventBus)
@@ -201,6 +203,7 @@ export class ViewControllerManager implements InternalEventHandlerInterface {
this.appEventObserverRemovers.forEach((remover) => remover())
this.appEventObserverRemovers.length = 0
;(this.device as unknown) = undefined
this.filePreviewModalController.deinit()
;(this.filePreviewModalController as unknown) = undefined
;(this.preferencesController as unknown) = undefined
;(this.quickSettingsMenuController as unknown) = undefined