fix(plugins/staff-settings): don't show toast at startup
This commit is contained in:
parent
b1d65fbda2
commit
9525f98289
1 changed files with 10 additions and 7 deletions
|
|
@ -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()
|
||||
}),
|
||||
)
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue