Subs/unsubs optimistic
This commit is contained in:
parent
e8b2a6d0c0
commit
d5bb87af27
4 changed files with 14 additions and 3 deletions
|
|
@ -5,7 +5,6 @@ import 'package:fires_flutter/models/yourLocation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_fab_dialer/flutter_fab_dialer.dart';
|
import 'package:flutter_fab_dialer/flutter_fab_dialer.dart';
|
||||||
import 'package:flutter_redux/flutter_redux.dart';
|
import 'package:flutter_redux/flutter_redux.dart';
|
||||||
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
|
||||||
import 'package:redux/src/store.dart';
|
import 'package:redux/src/store.dart';
|
||||||
|
|
||||||
import 'colors.dart';
|
import 'colors.dart';
|
||||||
|
|
@ -95,6 +94,8 @@ class _ActiveFiresPageState extends State<ActiveFiresPage> {
|
||||||
onPressed: () {
|
onPressed: () {
|
||||||
loc.subscribed = !loc.subscribed;
|
loc.subscribed = !loc.subscribed;
|
||||||
onToggle(loc);
|
onToggle(loc);
|
||||||
|
setState(() {});
|
||||||
|
showSnackMsg(loc.subscribed? S.of(context).subscribedToFires: S.of(context).unsubscribedToFires);
|
||||||
}),
|
}),
|
||||||
title: new Text(loc.description, style: new TextStyle(fontSize: 16.0)),
|
title: new Text(loc.description, style: new TextStyle(fontSize: 16.0)),
|
||||||
subtitle: loc.currentNumFires == YourLocation.withoutStats
|
subtitle: loc.currentNumFires == YourLocation.withoutStats
|
||||||
|
|
|
||||||
|
|
@ -75,6 +75,7 @@ class S implements WidgetsLocalizations {
|
||||||
String get privacyPolicy => "Privacy Policy";
|
String get privacyPolicy => "Privacy Policy";
|
||||||
String get shareAppBtn => "Share our app";
|
String get shareAppBtn => "Share our app";
|
||||||
String get starAppBtn => "Rate our app";
|
String get starAppBtn => "Rate our app";
|
||||||
|
String get subscribedToFires => "Subscribed to fires notifications";
|
||||||
String get supportPageDescription => "You can support this initiative, spreading the word, helping us to develop our software, translating this app to your language, suggesting other public data sources of fires to use, etc.";
|
String get supportPageDescription => "You can support this initiative, spreading the word, helping us to develop our software, translating this app to your language, suggesting other public data sources of fires to use, etc.";
|
||||||
String get supportThisInitiative => "Support this initiative";
|
String get supportThisInitiative => "Support this initiative";
|
||||||
String get thanksForParticipating => "Thanks for participating";
|
String get thanksForParticipating => "Thanks for participating";
|
||||||
|
|
@ -85,6 +86,7 @@ class S implements WidgetsLocalizations {
|
||||||
String get tweetAboutAFireTitle => "Tweet about";
|
String get tweetAboutAFireTitle => "Tweet about";
|
||||||
String get typeTheNameOfAPlace => "Type the name of a place, region, etc";
|
String get typeTheNameOfAPlace => "Type the name of a place, region, etc";
|
||||||
String get unsubscribe => "Unsubscribe";
|
String get unsubscribe => "Unsubscribe";
|
||||||
|
String get unsubscribedToFires => "Unsubscribed to fires notifications";
|
||||||
String get warningThisIsAVeryLargeArea => "Warning: this is a very large area";
|
String get warningThisIsAVeryLargeArea => "Warning: this is a very large area";
|
||||||
String get youDeletedThisNotification => "You deleted this notification";
|
String get youDeletedThisNotification => "You deleted this notification";
|
||||||
String get youDeletedThisPlace => "You deleted this place";
|
String get youDeletedThisPlace => "You deleted this place";
|
||||||
|
|
@ -177,6 +179,8 @@ class es extends S {
|
||||||
@override
|
@override
|
||||||
String get aYear => "un año";
|
String get aYear => "un año";
|
||||||
@override
|
@override
|
||||||
|
String get unsubscribedToFires => "Desuscrito a notificaciones de fuegos";
|
||||||
|
@override
|
||||||
String get itSeemsNotAtForesFire => "Parece que este fuego no es un fuego forestal.";
|
String get itSeemsNotAtForesFire => "Parece que este fuego no es un fuego forestal.";
|
||||||
@override
|
@override
|
||||||
String get UNDO => "DESHACER";
|
String get UNDO => "DESHACER";
|
||||||
|
|
@ -193,6 +197,8 @@ class es extends S {
|
||||||
@override
|
@override
|
||||||
String get NASAAck => "Reconocemos el uso de datos e imágenes de LANCE FIRMS operadas por NASA/GSFC/Earth Science Data and Information System (ESDIS) con fondos proporcionados por NASA/HQ.";
|
String get NASAAck => "Reconocemos el uso de datos e imágenes de LANCE FIRMS operadas por NASA/GSFC/Earth Science Data and Information System (ESDIS) con fondos proporcionados por NASA/HQ.";
|
||||||
@override
|
@override
|
||||||
|
String get subscribedToFires => "Suscrito a notificaciones de fuegos";
|
||||||
|
@override
|
||||||
String get isYourUbicationEnabled => "No podemos saber tu ubicación actual. ¿Están los servicios de ubicación en tu móvil activados?";
|
String get isYourUbicationEnabled => "No podemos saber tu ubicación actual. ¿Están los servicios de ubicación en tu móvil activados?";
|
||||||
@override
|
@override
|
||||||
String get thanksForParticipating => "Gracias por Participar";
|
String get thanksForParticipating => "Gracias por Participar";
|
||||||
|
|
|
||||||
|
|
@ -79,5 +79,7 @@
|
||||||
"mapPrivacy": "In order to preserve the privacy of our users, the reflected data are randomly altered and are only indicative.",
|
"mapPrivacy": "In order to preserve the privacy of our users, the reflected data are randomly altered and are only indicative.",
|
||||||
"comunesSupportBtn": "Know and support our work",
|
"comunesSupportBtn": "Know and support our work",
|
||||||
"shareAppBtn": "Share our app",
|
"shareAppBtn": "Share our app",
|
||||||
"starAppBtn": "Rate our app"
|
"starAppBtn": "Rate our app",
|
||||||
|
"unsubscribedToFires": "Unsubscribed to fires notifications",
|
||||||
|
"subscribedToFires": "Subscribed to fires notifications"
|
||||||
}
|
}
|
||||||
|
|
@ -79,5 +79,7 @@
|
||||||
"mapPrivacy": "Para preservar la privacidad de nuestros usuarios/as, los datos reflejados están aleatoriamente alterados y son solo orientativos.",
|
"mapPrivacy": "Para preservar la privacidad de nuestros usuarios/as, los datos reflejados están aleatoriamente alterados y son solo orientativos.",
|
||||||
"comunesSupportBtn": "Conoce y apoya nuestro trabajo",
|
"comunesSupportBtn": "Conoce y apoya nuestro trabajo",
|
||||||
"shareAppBtn": "Comparte nuestra app",
|
"shareAppBtn": "Comparte nuestra app",
|
||||||
"starAppBtn": "Puntúa nuestra app"
|
"starAppBtn": "Puntúa nuestra app",
|
||||||
|
"unsubscribedToFires": "Desuscrito a notificaciones de fuegos",
|
||||||
|
"subscribedToFires": "Suscrito a notificaciones de fuegos"
|
||||||
}
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue