Optimizing, debugging, decorating
This commit is contained in:
@@ -7,6 +7,7 @@ using Google.Apis.YouTube.v3;
|
||||
using Google.Apis.YouTube.v3.Data;
|
||||
using YoutubeExplode.Models.MediaStreams;
|
||||
using System;
|
||||
using Windows.Globalization;
|
||||
|
||||
namespace FoxTube.Pages.SettingsPages
|
||||
{
|
||||
@@ -80,7 +81,7 @@ namespace FoxTube.Pages.SettingsPages
|
||||
{
|
||||
if (SettingsStorage.Language == (language.SelectedItem as ComboBoxItem).Tag.ToString())
|
||||
return;
|
||||
|
||||
ApplicationLanguages.PrimaryLanguageOverride = (language.SelectedItem as ComboBoxItem).Tag.ToString();
|
||||
SettingsStorage.Language = (language.SelectedItem as ComboBoxItem).Tag.ToString();
|
||||
restartNote.Visibility = Visibility.Visible;
|
||||
}
|
||||
@@ -125,21 +126,20 @@ namespace FoxTube.Pages.SettingsPages
|
||||
if (sender == light && SettingsStorage.Theme != 0)
|
||||
{
|
||||
SettingsStorage.Theme = 0;
|
||||
Methods.MainPage.RequestedTheme = ElementTheme.Light;
|
||||
Application.Current.RequestedTheme = ApplicationTheme.Light;
|
||||
}
|
||||
else if (sender == dark && SettingsStorage.Theme != 1)
|
||||
{
|
||||
SettingsStorage.Theme = 1;
|
||||
Methods.MainPage.RequestedTheme = ElementTheme.Dark;
|
||||
Application.Current.RequestedTheme = ApplicationTheme.Dark;
|
||||
}
|
||||
else if (sender == system && SettingsStorage.Theme != 2)
|
||||
{
|
||||
SettingsStorage.Theme = 2;
|
||||
Color uiTheme = new Windows.UI.ViewManagement.UISettings().GetColorValue(Windows.UI.ViewManagement.UIColorType.Background);
|
||||
if (uiTheme == Colors.Black)
|
||||
Methods.MainPage.RequestedTheme = ElementTheme.Dark;
|
||||
if (new Windows.UI.ViewManagement.UISettings().GetColorValue(Windows.UI.ViewManagement.UIColorType.Background) == Colors.Black)
|
||||
Application.Current.RequestedTheme = ApplicationTheme.Dark;
|
||||
else
|
||||
Methods.MainPage.RequestedTheme = ElementTheme.Light;
|
||||
Application.Current.RequestedTheme = ApplicationTheme.Light;
|
||||
}
|
||||
Methods.MainPage.SetTitleBar();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user