Added more logs

This commit is contained in:
Vicente J. Ruiz Jurado 2018-08-08 08:44:22 +02:00
parent 6afe821861
commit e9c6c3fc55

View file

@ -62,6 +62,7 @@ class _FireNotificationListState extends State<FireNotificationList> {
String prefix = ""; String prefix = "";
if (notif.subsId != null) { if (notif.subsId != null) {
// FIXME (this can fails if you don't have a location for this notif, for instance during tests)
YourLocation yl = YourLocation yl =
yourLocations.singleWhere((yl) => yl.id == notif.subsId); yourLocations.singleWhere((yl) => yl.id == notif.subsId);
prefix = '${yl.description}. '; prefix = '${yl.description}. ';
@ -143,7 +144,7 @@ class _FireNotificationListState extends State<FireNotificationList> {
return new StoreConnector<AppState, _ViewModel>( return new StoreConnector<AppState, _ViewModel>(
distinct: true, distinct: true,
converter: (store) { converter: (store) {
print('New ViewModel of Fires Notifications'); print('New ViewModel of Fires Notifications (unread: ${store.state.fireNotificationsUnread})');
return new _ViewModel( return new _ViewModel(
onDeleteAll: () { onDeleteAll: () {
store.dispatch(new DeleteAllFireNotificationAction()); store.dispatch(new DeleteAllFireNotificationAction());