This commit is contained in:
janisslsm committed 2026-11-01 12:12:55 +02:00
1 parent 1781d25a15
commit 732c0ad767
33051 files changed
+2591613 -3019689

No files matched your search

@@ -0,0 +1,23 @@
// Metro module 8826 (f8827).
import UnsyncedUserSettingsStore from "../../user_settings/UnsyncedUserSettingsStore";
import ClientThemesBackgroundStore from "../ClientThemesBackgroundStore";
import CustomThemeMobileStore from "./CustomThemeMobileStore";
import { ActiveThemeType, SystemThemeState } from "../../user_settings/ThemeConstants";
import { useStateFromStores } from "../../../_bundle/Module589";
import useRoutedActiveGuildTheme from "../../guild_themes/native/useRoutedActiveGuildTheme";
const useActiveThemeType = function useActiveThemeType() {
const stateFromStores = useStateFromStores([CustomThemeMobileStore], () => CustomThemeMobileStore.hasCustomTheme());
const stateFromStores2 = useStateFromStores([ClientThemesBackgroundStore], () => ClientThemesBackgroundStore.gradientPreset != null);
const routedActiveGuildTheme = useRoutedActiveGuildTheme();
const stateFromStores3 = useStateFromStores([UnsyncedUserSettingsStore], () => UnsyncedUserSettingsStore.useSystemTheme);
const ON = SystemThemeState.ON;
return routedActiveGuildTheme?.type === "custom" ? ActiveThemeType.CUSTOM : routedActiveGuildTheme?.type === "preset" ? ActiveThemeType.CLIENT : stateFromStores ? ActiveThemeType.CUSTOM : stateFromStores2 ? ActiveThemeType.CLIENT : stateFromStores3 === ON ? ActiveThemeType.SYSTEM : ActiveThemeType.DEFAULT;
};
export function useIsCustomThemeActive() {
return useActiveThemeType() === ActiveThemeType.CUSTOM;
}
export function useIsClientThemeOrCustomThemeActive() {
const activeThemeType = useActiveThemeType();
return activeThemeType === ActiveThemeType.CLIENT || activeThemeType === ActiveThemeType.CUSTOM;
}
export { useActiveThemeType };