chore: hide previos error snackbar in settings notifications before showing another one (#5802)
This commit is contained in:
parent
d9eaf58f05
commit
81dbffd031
1 changed files with 6 additions and 0 deletions
|
|
@ -81,6 +81,9 @@ class SettingsNotificationsController extends State<SettingsNotifications> {
|
|||
} catch (e, s) {
|
||||
Logs().w('Unable to toggle push rule', e, s);
|
||||
if (!mounted) return;
|
||||
// #Pangea
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
// Pangea#
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(SnackBar(content: Text(e.toLocalizedString(context))));
|
||||
|
|
@ -165,6 +168,9 @@ class SettingsNotificationsController extends State<SettingsNotifications> {
|
|||
} catch (e, s) {
|
||||
Logs().w('Unable to delete push rule', e, s);
|
||||
if (!mounted) return;
|
||||
// #Pangea
|
||||
ScaffoldMessenger.of(context).hideCurrentSnackBar();
|
||||
// Pangea#
|
||||
ScaffoldMessenger.of(
|
||||
context,
|
||||
).showSnackBar(SnackBar(content: Text(e.toLocalizedString(context))));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue