Whats new page

This commit is contained in:
estevez-dev
2019-09-15 20:23:03 +03:00
parent bf6a52e0b9
commit 14958d9165
3 changed files with 76 additions and 18 deletions

View File

@ -14,7 +14,7 @@ class StartupUserMessagesManager {
bool _supportAppDevelopmentMessageShown;
bool _whatsNewMessageShown;
static final _supportAppDevelopmentMessageKey = "user-message-shown-support-development_3";
static final _whatsNewMessageKey = "user-message-shown-whats-new-660";
static final _whatsNewMessageKey = "user-message-shown-whats-new-672";
void checkMessagesToShow() async {
SharedPreferences prefs = await SharedPreferences.getInstance();
@ -49,23 +49,10 @@ class StartupUserMessagesManager {
}
void _showWhatsNewMessage() {
eventBus.fire(ShowPopupDialogEvent(
title: "What's new",
body: "You can now share any media url to HA Client via Android share menu. It will try to play that media on one of your media player. There is also 'tv' button available in app header if you want to send some url manually",
positiveText: "Full release notes",
negativeText: "Ok",
onPositive: () {
SharedPreferences.getInstance().then((prefs) {
prefs.setBool(_whatsNewMessageKey, true);
Launcher.launchURL("https://github.com/estevez-dev/ha_client/releases");
});
},
onNegative: () {
SharedPreferences.getInstance().then((prefs) {
prefs.setBool(_whatsNewMessageKey, true);
});
}
));
SharedPreferences.getInstance().then((prefs) {
prefs.setBool(_whatsNewMessageKey, true);
eventBus.fire(ShowPageEvent(path: "/whats-new"));
});
}
}