chore: upgrade snjs (#985)

This commit is contained in:
Mo
2022-04-18 13:21:41 -05:00
committed by GitHub
parent a9bab0938b
commit b6eeaea516
8 changed files with 124 additions and 120 deletions

View File

@@ -7,7 +7,6 @@ import {
ApplicationEvent,
removeFromArray,
DesktopManagerInterface,
PayloadSource,
InternalEventBus,
} from '@standardnotes/snjs'
import { WebAppEvent, WebApplication } from '@/UIModels/Application'
@@ -140,7 +139,6 @@ export class DesktopManager
}
},
undefined,
PayloadSource.DesktopInstalled,
)
for (const observer of this.updateObservers) {

View File

@@ -8,10 +8,11 @@ import {
ContentType,
UuidString,
FeatureStatus,
PayloadSource,
PrefKey,
CreateDecryptedLocalStorageContextPayload,
InternalEventBus,
PayloadEmitSource,
LocalStorageDecryptedContextualPayload,
} from '@standardnotes/snjs'
import { dismissToast, ToastType, addTimedToast } from '@standardnotes/stylekit'
@@ -233,7 +234,7 @@ export class ThemeManager extends ApplicationService {
this.deactivateTheme(theme.uuid)
}
}
if (source !== PayloadSource.LocalRetrieved) {
if (source !== PayloadEmitSource.LocalRetrieved) {
this.cacheThemeState().catch(console.error)
}
},
@@ -300,7 +301,8 @@ export class ThemeManager extends ApplicationService {
const cachedThemes = (await this.application.getValue(
CachedThemesKey,
StorageValueModes.Nonwrapped,
)) as SNTheme[]
)) as LocalStorageDecryptedContextualPayload[]
if (cachedThemes) {
const themes = []
for (const cachedTheme of cachedThemes) {