mirror of
https://github.com/Vendicated/Vencord.git
synced 2025-02-25 07:48:32 +00:00
make it ignore current user
This commit is contained in:
parent
409b091847
commit
81a191cae4
1 changed files with 5 additions and 5 deletions
|
@ -22,7 +22,7 @@ import { Devs } from "@utils/constants";
|
|||
import { classes } from "@utils/misc";
|
||||
import definePlugin, { OptionType } from "@utils/types";
|
||||
import { findByPropsLazy } from "@webpack";
|
||||
import { React } from "@webpack/common";
|
||||
import { React, UserStore } from "@webpack/common";
|
||||
import { Message, User } from "discord-types/general";
|
||||
|
||||
import { getTimeString, getUserTimezone } from "./Utils";
|
||||
|
@ -130,12 +130,12 @@ export default definePlugin({
|
|||
|
||||
getProfileTimezonesComponent: (e: any) => {
|
||||
|
||||
if (!Vencord.Settings.plugins.Timezones.showTimezonesInProfile) {
|
||||
const user = e.user as User;
|
||||
|
||||
if (!Vencord.Settings.plugins.Timezones.showTimezonesInProfile || user.id === UserStore.getCurrentUser().id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const user = e.user as User;
|
||||
|
||||
const [timezone, setTimezone] = React.useState<string | null>(null);
|
||||
|
||||
React.useEffect(() => {
|
||||
|
@ -158,7 +158,7 @@ export default definePlugin({
|
|||
}
|
||||
,
|
||||
getTimezonesComponent: (e: any) => {
|
||||
if (Vencord.Settings.plugins.showTimezonesInChat || e.user)
|
||||
if (Vencord.Settings.plugins.showTimezonesInChat || e.user || e.message.author.id === UserStore.getCurrentUser().id)
|
||||
return null;
|
||||
|
||||
const message = e.message as Message;
|
||||
|
|
Loading…
Add table
Reference in a new issue