diff --git a/src/plugins/Timezones/Utils.ts b/src/plugins/Timezones/Utils.ts index c84e00e97..9c9d7b5bd 100644 --- a/src/plugins/Timezones/Utils.ts +++ b/src/plugins/Timezones/Utils.ts @@ -92,13 +92,13 @@ export function getUserTimezone(discordID: string, strategy: CustomTimezonePrefe return new Promise(res => { const timezone = (DataStore.get(DATASTORE_KEY) as Promise).then(tzs => tzs?.[discordID]); timezone.then(tz => { - if (strategy == CustomTimezonePreference.Always) { + if (strategy === CustomTimezonePreference.Always) { if (tz) res(tz); else res(undefined); return; } - if (tz && strategy == CustomTimezonePreference.Secondary) + if (tz && strategy === CustomTimezonePreference.Secondary) res(tz); else { if (discordID in Cache) res(Cache[discordID]); @@ -121,7 +121,7 @@ export const getAllTimezones = async (): Promise => { if (typeof Intl !== "undefined" && "supportedValuesOf" in Intl) { try { // @ts-expect-error fuck you typescript - return Intl.supportedValuesOf('timeZone'); + return Intl.supportedValuesOf("timeZone"); } catch { } } diff --git a/src/plugins/Timezones/settings.tsx b/src/plugins/Timezones/settings.tsx index feee1a4d3..e385cdb41 100644 --- a/src/plugins/Timezones/settings.tsx +++ b/src/plugins/Timezones/settings.tsx @@ -1,3 +1,21 @@ +/* + * Vencord, a modification for Discord's desktop app + * Copyright (c) 2022 Vendicated and contributors + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . +*/ + import { definePluginSettings } from "@api/settings"; import { OptionType } from "@utils/types";