mirror of
https://bitbucket.org/myhomie/myhomie_app.git
synced 2025-12-06 00:51:19 +00:00
Fix multiple message in app
This commit is contained in:
parent
e63b2a0715
commit
091b89d894
@ -1,5 +1,5 @@
|
||||
#Thu Aug 31 16:53:49 CEST 2023
|
||||
VERSION_BUILD=89
|
||||
#Fri Sep 01 08:41:57 CEST 2023
|
||||
VERSION_BUILD=91
|
||||
VERSION_MAJOR=1
|
||||
VERSION_MINOR=0
|
||||
VERSION_PATCH=0
|
||||
|
||||
@ -31,6 +31,8 @@ class MainPage extends StatefulWidget {
|
||||
}
|
||||
|
||||
class _MainPageState extends State<MainPage> {
|
||||
bool isAlreadyInstantiated = false;
|
||||
|
||||
setPage() {
|
||||
setState(() {
|
||||
pageController.jumpToPage(currentIndex);
|
||||
@ -51,8 +53,13 @@ class _MainPageState extends State<MainPage> {
|
||||
print("MQTT NOT INSTANTIATED");
|
||||
MQTTHelper.instance.connect(appContext);
|
||||
}
|
||||
|
||||
if (!isAlreadyInstantiated)
|
||||
{
|
||||
final pushNotificationService = PushNotificationService();
|
||||
pushNotificationService.initialise(homieAppContext, context);
|
||||
isAlreadyInstantiated = true;
|
||||
}
|
||||
|
||||
return ChangeNotifierProvider<Index>(
|
||||
create: (_) => Index(0, appContext.getContext()),
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user