Skip to content

Commit

Permalink
Fix theme specific colors.
Browse files Browse the repository at this point in the history
  • Loading branch information
angelinn committed May 11, 2024
1 parent b420ea5 commit 8814d5f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ public SettingsViewModel(VersionService versionService)
SelectedFetchingStrategy = ApplicationService.GetStringSetting(Settings.FetchingStrategy, "Full");

string theme = ApplicationService.GetStringSetting(Settings.Theme, Names.SystemDefault);
SelectedTheme = theme == Names.LightTheme ? Themes[0] : Themes[1];
SelectedTheme = theme switch
{
Names.LightTheme => Themes[0],
Names.DarkTheme => Themes[1],
Names.SystemDefault => Themes[2],
_ => Themes[2]
};
}

public void Initialize(Func<string, string, string, string[], Task<string>> displayActionSheet)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ public class TransportTypeToColorConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
bool isLightTheme = Application.Current.UserAppTheme == AppTheme.Light;
bool isLightTheme = Application.Current.RequestedTheme == AppTheme.Light;

string textValue = string.Empty;
if (value is TransportType type)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.openbulgariasoftware.trammy" android:versionName="3.17" android:versionCode="47">
<manifest xmlns:android="http://schemas.android.com/apk/res/android" android:installLocation="internalOnly" package="com.openbulgariasoftware.trammy" android:versionName="3.18" android:versionCode="48">
<uses-sdk android:minSdkVersion="21" android:targetSdkVersion="33" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
Expand Down

0 comments on commit 8814d5f

Please sign in to comment.