diff --git a/src/equicordplugins/timezones/index.tsx b/src/equicordplugins/timezones/index.tsx index 1d97240bc..7d0590544 100644 --- a/src/equicordplugins/timezones/index.tsx +++ b/src/equicordplugins/timezones/index.tsx @@ -279,6 +279,13 @@ export default definePlugin({ patches: [ // stolen from ViewIcons + { + find: 'backgroundColor:"COMPLETE"===', + replacement: { + match: /bannerSrc:\i,(?=backgroundColor:"COMPLETE")/, + replace: "$&user:arguments[0].user," + } + }, { find: '"--custom-cutout-radius":', replacement: { @@ -351,12 +358,9 @@ export default definePlugin({ getTime, renderProfileTimezone: props => { - if (!settings.store.showProfileTime || !props?.bannerSrc) return null; - - const match = /\/banners\/(\d+)\//.exec(props.bannerSrc); - const userId = match?.[1]; - if (!userId) return null; + if (!settings.store.showProfileTime || !props?.user?.id) return null; + const userId = props.user.id; if (userId === UserStore.getCurrentUser().id && !settings.store.showOwnTimezone) return null; return ;