fix(plugins/staff-settings): don't show toast at startup

This commit is contained in:
PalmDevs 2026-08-14 01:49:27 +07:00
parent b1d65fbda2
commit 9525f98289
No known key found for this signature in database
GPG key ID: 6FAE8F8677ACA8BA

View file

@ -20,13 +20,20 @@ registerInternalPlugin(
icon: 'StaffBadgeIcon', icon: 'StaffBadgeIcon',
}, },
{ {
start({ cleanup, logger }) { start({ cleanup, logger, plugin }) {
const CircleInformationIcon = lookupGeneratedIconComponent( const CircleInformationIcon = lookupGeneratedIconComponent(
'CircleInformationIcon', 'CircleInformationIcon',
'CircleInformationIcon-secondary', 'CircleInformationIcon-secondary',
'CircleInformationIcon-primary', 'CircleInformationIcon-primary',
) )
const showToast = () =>
ToastActionCreators.open({
key: 'staff-settings-action',
content: 'Navigate out of Settings to apply changes',
IconComponent: CircleInformationIcon,
})
function reset() { function reset() {
getStore<{ getStore<{
initialize(): void initialize(): void
@ -43,12 +50,6 @@ registerInternalPlugin(
store.initialize() store.initialize()
unpatch() unpatch()
ToastActionCreators.open({
key: 'staff-settings-action',
content: 'Navigate out of Settings to apply changes',
IconComponent: CircleInformationIcon,
})
}) })
} }
@ -69,9 +70,11 @@ registerInternalPlugin(
).getCurrentUser(), ).getCurrentUser(),
), ),
reset, reset,
showToast,
) )
reset() reset()
if (plugin.startedLate) showToast()
}), }),
) )
}, },