Adaptive Notifications + before enabling desktop

This commit is contained in:
warlock
2022-03-06 18:04:53 +05:30
parent 0272b2d1fd
commit f749c4ce8d
6 changed files with 141 additions and 28 deletions

View File

@@ -23,9 +23,12 @@ class _NotificationSettingsState extends State<NotificationSettings> {
void updateSettings() async{
int notificationInterval= await Settings.getNotificationInterval();
bool _adaptiveNotification = await Settings.getAdaptiveNotification();
adaptiveNotificationAvailable = Settings.adaptiveNotificationAvailable();
print("adaptive available: ${adaptiveNotificationAvailable}");
setState(() {
dropdownValue=Settings.notificationOptions[notificationInterval];
adaptiveNotification = _adaptiveNotification;
});
}
@@ -44,6 +47,7 @@ class _NotificationSettingsState extends State<NotificationSettings> {
title: Text("Adaptive Notifications"),
trailing:(adaptiveNotificationAvailable) ?Switch.adaptive(value: adaptiveNotification, onChanged: (val){
adaptiveNotification=val;
Settings.setAdaptiveNotification(val);
setState(() {
});