chore: upgrade deps

This commit is contained in:
Mo
2022-03-21 14:31:42 -05:00
parent ea0ca7dc18
commit 9f032f13c2
27 changed files with 143 additions and 183 deletions

View File

@@ -132,7 +132,7 @@ export class DesktopManager
componentData: any,
error: any
) {
const component = this.application.findItem(componentData.uuid);
const component = this.application.items.findItem(componentData.uuid);
if (!component) {
return;
}

View File

@@ -40,7 +40,7 @@ export class ThemeManager extends ApplicationService {
const preference = prefersDarkColorScheme
? PrefKey.AutoDarkThemeIdentifier
: PrefKey.AutoLightThemeIdentifier;
const themes = this.application.getDisplayableItems(
const themes = this.application.items.getDisplayableItems(
ContentType.Theme
) as SNTheme[];
@@ -123,7 +123,7 @@ export class ThemeManager extends ApplicationService {
private handleFeaturesUpdated(): void {
let hasChange = false;
for (const themeUuid of this.activeThemes) {
const theme = this.application.findItem(themeUuid) as SNTheme;
const theme = this.application.items.findItem(themeUuid) as SNTheme;
if (!theme) {
this.deactivateTheme(themeUuid);
hasChange = true;
@@ -143,7 +143,7 @@ export class ThemeManager extends ApplicationService {
}
const activeThemes = (
this.application.getItems(ContentType.Theme) as SNTheme[]
this.application.items.getItems(ContentType.Theme) as SNTheme[]
).filter((theme) => theme.active);
for (const theme of activeThemes) {
@@ -248,7 +248,9 @@ export class ThemeManager extends ApplicationService {
}
private async cacheThemeState() {
const themes = this.application.getAll(this.activeThemes) as SNTheme[];
const themes = this.application.items.findItems(
this.activeThemes
) as SNTheme[];
const mapped = await Promise.all(
themes.map(async (theme) => {
const payload = theme.payloadRepresentation();
@@ -275,8 +277,9 @@ export class ThemeManager extends ApplicationService {
if (cachedThemes) {
const themes = [];
for (const cachedTheme of cachedThemes) {
const payload = this.application.createPayloadFromObject(cachedTheme);
const theme = this.application.createItemFromPayload(
const payload =
this.application.items.createPayloadFromObject(cachedTheme);
const theme = this.application.items.createItemFromPayload(
payload
) as SNTheme;
themes.push(theme);