Skip to content

Commit

Permalink
Fixes warning notification to open warnings screen respectively (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Ruivo committed Aug 30, 2020
1 parent 167150d commit 472dd0d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/screens/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,11 @@ class HomePage extends StatelessWidget {
onResume: (Map<String, dynamic> message) async {
print('on resume $message');
String fireId = message["fireId"];
bool isWarning = message["warning"] ?? false;

final store = StoreProvider.of<AppState>(context);
store.dispatch(ClearFireAction());
store.dispatch(LoadFireAction(fireId));
store.dispatch(isWarning ? LoadWarningsAction() : LoadFireAction(fireId));
_openModalSheet(context);
},
onLaunch: (Map<String, dynamic> message) async {
Expand Down

0 comments on commit 472dd0d

Please sign in to comment.