Development 110218
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.Globalization;
|
||||
@@ -90,9 +91,13 @@ namespace FoxTube.Pages.SettingsPages
|
||||
settings.Values["videoAutoplay"] = autoplay.IsOn;
|
||||
}
|
||||
|
||||
private void notification_IsEnabledChanged(object sender, RoutedEventArgs e)
|
||||
private async void notification_IsEnabledChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
settings.Values["newVideoNotification"] = newVideo.IsOn;
|
||||
bool[] notificationsSettings = new bool[] { (bool)settings.Values["newVideoNotification"], (bool)settings.Values["devNews"] };
|
||||
await FileIO.WriteTextAsync(
|
||||
await ApplicationData.Current.RoamingFolder.CreateFileAsync("notifications.json", CreationCollisionOption.ReplaceExisting),
|
||||
JsonConvert.SerializeObject(notificationsSettings));
|
||||
}
|
||||
|
||||
private void region_SelectionChanged(object sender, SelectionChangedEventArgs e)
|
||||
@@ -135,9 +140,13 @@ namespace FoxTube.Pages.SettingsPages
|
||||
CoreApplication.Exit();
|
||||
}
|
||||
|
||||
private void devNews_Toggled(object sender, RoutedEventArgs e)
|
||||
private async void devNews_Toggled(object sender, RoutedEventArgs e)
|
||||
{
|
||||
settings.Values["devnews"] = devNews.IsOn;
|
||||
bool[] notificationsSettings = new bool[] { (bool)settings.Values["newVideoNotification"], (bool)settings.Values["devNews"] };
|
||||
await FileIO.WriteTextAsync(
|
||||
await ApplicationData.Current.RoamingFolder.CreateFileAsync("notifications.json", CreationCollisionOption.ReplaceExisting),
|
||||
JsonConvert.SerializeObject(notificationsSettings));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user