chore: upgrade snjs deps

This commit is contained in:
Mo
2022-03-31 14:07:21 -05:00
parent ba0d00c32d
commit 90fcac61e0
6 changed files with 146 additions and 193 deletions

View File

@@ -11,6 +11,7 @@ import {
FeatureStatus,
PayloadSource,
PrefKey,
CreateIntentPayloadFromObject,
} from '@standardnotes/snjs';
import { InternalEventBus } from '@standardnotes/services';
@@ -271,17 +272,15 @@ export class ThemeManager extends ApplicationService {
const themes = this.application.items.findItems(
this.activeThemes
) as SNTheme[];
const mapped = await Promise.all(
themes.map(async (theme) => {
const payload = theme.payloadRepresentation();
const processedPayload =
await this.application.protocolService.payloadByEncryptingPayload(
payload,
EncryptionIntent.LocalStorageDecrypted
);
return processedPayload;
})
);
const mapped = themes.map((theme) => {
const payload = theme.payloadRepresentation();
return CreateIntentPayloadFromObject(
payload,
EncryptionIntent.LocalStorageDecrypted
);
});
return this.application.setValue(
CACHED_THEMES_KEY,
mapped,