mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-25 15:58:31 +00:00
minor tweak
This commit is contained in:
parent
5a0fb5b734
commit
aeff943207
2 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,6 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
const PreloadedUserSettings = findLazy(m => m.ProtoClass?.typeName === "discord_protos.discord_users.v1.PreloadedUserSettings");
|
||||
|
||||
import * as DataStore from "@api/DataStore";
|
||||
import { VENCORD_USER_AGENT } from "@utils/constants";
|
||||
|
@ -32,6 +31,7 @@ export interface TimezoneDB {
|
|||
export const API_URL = "https://timezonedb.catvibers.me";
|
||||
const Cache: Record<string, string> = {};
|
||||
|
||||
const PreloadedUserSettings = findLazy(m => m.ProtoClass?.typeName === "discord_protos.discord_users.v1.PreloadedUserSettings");
|
||||
export function getTimeString(timezone: string, timestamp = new Date()): string {
|
||||
const locale = PreloadedUserSettings.getCurrentValue().localization.locale.value;
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ export default definePlugin({
|
|||
],
|
||||
|
||||
getProfileTimezonesComponent: ({ user }: { user: User; }) => {
|
||||
const { preference } = settings.use(["preference"]);
|
||||
const { preference, showTimezonesInProfile } = settings.use(["preference", "showTimezonesInProfile"]);
|
||||
|
||||
const [timezone, setTimezone] = React.useState<string | undefined>();
|
||||
const [isInEditMode, setIsInEditMode] = React.useState(false);
|
||||
|
@ -91,7 +91,7 @@ export default definePlugin({
|
|||
return () => clearInterval(interval);
|
||||
}, [preference]);
|
||||
|
||||
if (!Vencord.Settings.plugins.Timezones.showTimezonesInProfile)
|
||||
if (!showTimezonesInProfile)
|
||||
return null;
|
||||
|
||||
return (
|
||||
|
|
Loading…
Add table
Reference in a new issue