From dc9c1ea0fc7b2510e8567c93305ad769ee79c566 Mon Sep 17 00:00:00 2001 From: Mo Date: Tue, 12 Apr 2022 09:29:43 -0500 Subject: [PATCH] chore: lint --- .../javascripts/services/desktopManager.ts | 2 ++ .../javascripts/ui_models/app_state/app_state.ts | 16 ++++++++-------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/services/desktopManager.ts b/app/assets/javascripts/services/desktopManager.ts index 412cba298..cb3fb8127 100644 --- a/app/assets/javascripts/services/desktopManager.ts +++ b/app/assets/javascripts/services/desktopManager.ts @@ -44,6 +44,7 @@ export class DesktopManager async onAppEvent(eventName: ApplicationEvent) { super.onAppEvent(eventName); + if (eventName === ApplicationEvent.LocalDataLoaded) { this.dataLoaded = true; this.bridge.onInitialDataLoad(); @@ -74,6 +75,7 @@ export class DesktopManager if (!this.isDesktop) { return; } + Promise.all( components.map((component) => { return this.convertComponentForTransmission(component); diff --git a/app/assets/javascripts/ui_models/app_state/app_state.ts b/app/assets/javascripts/ui_models/app_state/app_state.ts index ac1e97623..c077e3852 100644 --- a/app/assets/javascripts/ui_models/app_state/app_state.ts +++ b/app/assets/javascripts/ui_models/app_state/app_state.ts @@ -357,20 +357,20 @@ export class AppState { const selectedTag = this.tags.selected; + const isBrowswingTrashedNotes = + selectedTag instanceof SmartView && + selectedTag.uuid === SystemViewId.TrashedNotes; + + const isBrowsingArchivedNotes = + selectedTag instanceof SmartView && + selectedTag.uuid === SystemViewId.ArchivedNotes; + for (const note of changedOrInserted) { const noteController = this.noteControllerForNote(note.uuid); if (!noteController) { continue; } - const isBrowswingTrashedNotes = - selectedTag instanceof SmartView && - selectedTag.uuid === SystemViewId.TrashedNotes; - - const isBrowsingArchivedNotes = - selectedTag instanceof SmartView && - selectedTag.uuid === SystemViewId.ArchivedNotes; - if ( note.trashed && !isBrowswingTrashedNotes &&