fix: timed color scheme toast (#978)
This commit is contained in:
@@ -176,6 +176,7 @@ export class ThemeManager extends ApplicationService {
|
||||
const themes = this.application.items.getDisplayableItems(ContentType.Theme) as SNTheme[]
|
||||
|
||||
const activeTheme = themes.find((theme) => theme.active && !theme.isLayerable())
|
||||
const activeThemeIdentifier = activeTheme ? activeTheme.identifier : DefaultThemeIdentifier
|
||||
|
||||
const themeIdentifier = this.application.getPreference(
|
||||
preference,
|
||||
@@ -193,12 +194,9 @@ export class ThemeManager extends ApplicationService {
|
||||
}
|
||||
}
|
||||
|
||||
const isPreferredThemeNotActive = activeTheme?.identifier !== themeIdentifier
|
||||
const isPreferredThemeNotActive = activeThemeIdentifier !== themeIdentifier
|
||||
|
||||
const isDefaultThemePreferredAndNotActive =
|
||||
themeIdentifier === DefaultThemeIdentifier && activeTheme
|
||||
|
||||
if (isPreferredThemeNotActive && isDefaultThemePreferredAndNotActive) {
|
||||
if (isPreferredThemeNotActive) {
|
||||
this.showColorSchemeToast(setTheme)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
"@standardnotes/filepicker": "1.10.5",
|
||||
"@standardnotes/sncrypto-web": "1.8.2",
|
||||
"@standardnotes/snjs": "2.94.3",
|
||||
"@standardnotes/stylekit": "5.22.0",
|
||||
"@standardnotes/stylekit": "5.22.1",
|
||||
"@zip.js/zip.js": "^2.4.7",
|
||||
"mobx": "^6.5.0",
|
||||
"mobx-react-lite": "^3.3.0",
|
||||
|
||||
@@ -2508,10 +2508,10 @@
|
||||
"@standardnotes/sncrypto-common" "^1.7.5"
|
||||
"@standardnotes/utils" "^1.4.8"
|
||||
|
||||
"@standardnotes/stylekit@5.22.0":
|
||||
version "5.22.0"
|
||||
resolved "https://registry.yarnpkg.com/@standardnotes/stylekit/-/stylekit-5.22.0.tgz#9524f57bee328ff61336d9efcee5684f35430b94"
|
||||
integrity sha512-u3ywcUS/CJEp04B8XQNVDFtELCyAkwlQr2KiXVVXs1jnuhdMYAbvgLhwZR4MqBrnvTKtHRyH0Ryxd6M32lv7ZA==
|
||||
"@standardnotes/stylekit@5.22.1":
|
||||
version "5.22.1"
|
||||
resolved "https://registry.yarnpkg.com/@standardnotes/stylekit/-/stylekit-5.22.1.tgz#1e92b1e6428b0891047f9b7d91799203f12156aa"
|
||||
integrity sha512-JDdO7o7Ik+tfdKoi/VsF7bR+ZTMO/f6dVSyxjbtIb/NCS7KM4apFMBVoZ+ARBXhbhpoBnwyVJHpZBkiB1p2Cjw==
|
||||
dependencies:
|
||||
"@nanostores/preact" "^0.1.3"
|
||||
"@reach/listbox" "^0.16.2"
|
||||
|
||||
Reference in New Issue
Block a user