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