mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-09 15:05:26 +03:00
Move addMessage to finally block
This commit is contained in:
parent
82965f1724
commit
4ab50a5743
@ -131,12 +131,6 @@ export default function FrigatePlusSettingsView({
|
|||||||
position: "top-center",
|
position: "top-center",
|
||||||
});
|
});
|
||||||
setChangedValue(false);
|
setChangedValue(false);
|
||||||
addMessage(
|
|
||||||
"plus_restart",
|
|
||||||
"Restart required (Frigate+ model changed)",
|
|
||||||
undefined,
|
|
||||||
"plus_restart",
|
|
||||||
);
|
|
||||||
updateConfig();
|
updateConfig();
|
||||||
} else {
|
} else {
|
||||||
toast.error(
|
toast.error(
|
||||||
@ -160,6 +154,12 @@ export default function FrigatePlusSettingsView({
|
|||||||
);
|
);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
addMessage(
|
||||||
|
"plus_restart",
|
||||||
|
"Restart required (Frigate+ model changed)",
|
||||||
|
undefined,
|
||||||
|
"plus_restart",
|
||||||
|
);
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
});
|
});
|
||||||
}, [updateConfig, addMessage, frigatePlusSettings, t]);
|
}, [updateConfig, addMessage, frigatePlusSettings, t]);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user