Commit e7dd79d8 authored by Thomas's avatar Thomas
Browse files

Ask restart when theme is changed

parent e9b62b71
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
base_theme,0
base_theme,1
author,acn128
name,ACN
theme_boost_header_color,-727060
@@ -10,6 +10,6 @@ theme_icons_color,-15395562
pref_color_background,-1
pref_color_navigation_bar,true
pref_color_status_bar,true
theme_accent,-1
theme_accent,-14059009
theme_text_color,-13027015
theme_primary,-1
+4 −4
Original line number Diff line number Diff line
base_theme,0
base_theme,1
author,Animaly
name,Solarized - Cyan Accent
theme_boost_header_color,-69167
@@ -7,9 +7,9 @@ theme_text_header_2_line,-7102047
theme_statuses_color,-133405
theme_link_color,-14251054
theme_icons_color,-10106727
pref_color_background,-1
pref_color_background,-1120043
pref_color_navigation_bar,true
pref_color_status_bar,true
theme_accent,-1
theme_accent,-8021760
theme_text_color,-16766154
theme_primary,-1
theme_primary,-1120043
+12 −3
Original line number Diff line number Diff line
@@ -338,6 +338,7 @@ public class FragmentThemingSettings extends PreferenceFragmentCompat implements
        if (launch_custom_theme != null) {
            launch_custom_theme.setOnPreferenceClickListener(preference -> {
                startActivity(new Intent(requireActivity(), CyaneaSettingsActivity.class));
                shouldRestart = true;
                return false;
            });

@@ -456,6 +457,7 @@ public class FragmentThemingSettings extends PreferenceFragmentCompat implements
                            ComposeActivity.MY_PERMISSIONS_REQUEST_READ_EXTERNAL_STORAGE);
                    return true;
                }
                shouldRestart = true;
                Intent intent = new Intent(Intent.ACTION_GET_CONTENT);
                intent.addCategory(Intent.CATEGORY_OPENABLE);
                intent.setType("*/*");
@@ -476,6 +478,7 @@ public class FragmentThemingSettings extends PreferenceFragmentCompat implements
                    createPref();

                });
                shouldRestart = true;
                dialogBuilder.setNegativeButton(R.string.cancel, (dialog, id) -> dialog.dismiss());
                AlertDialog alertDialog = dialogBuilder.create();
                alertDialog.setCancelable(false);
@@ -514,12 +517,18 @@ public class FragmentThemingSettings extends PreferenceFragmentCompat implements
            int theme_statuses_color = appPref.getInt("theme_statuses_color", -1);
            int theme_link_color = appPref.getInt("theme_link_color", -1);
            int theme_icons_color = appPref.getInt("theme_icons_color", -1);
            int pref_color_background = cyneaPref.getInt("pref_color_background", -1);
            int pref_color_background;
            if (cyneaPref.getString("base_theme", "DARK").compareTo("DARK") == 0) {
                pref_color_background = cyneaPref.getInt("background_dark", -1);
            } else {
                pref_color_background = cyneaPref.getInt("background_light", -1);
            }

            boolean pref_color_navigation_bar = cyneaPref.getBoolean("pref_color_navigation_bar", true);
            boolean pref_color_status_bar = cyneaPref.getBoolean("pref_color_status_bar", true);
            int theme_accent = cyneaPref.getInt("theme_accent", -1);
            int theme_accent = cyneaPref.getInt("accent", -1);
            int theme_text_color = appPref.getInt("theme_text_color", -1);
            int theme_primary = cyneaPref.getInt("theme_primary", -1);
            int theme_primary = cyneaPref.getInt("primary", -1);

            int theme = appPref.getInt(getString(R.string.SET_THEME), 0);

+1 −1
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:tint="#FFFFFF"
    android:tint="?attr/colorControlNormal"
    android:viewportWidth="24"
    android:viewportHeight="24">
    <path
+1 −1
Original line number Diff line number Diff line
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="24dp"
    android:height="24dp"
    android:tint="#FFFFFF"
    android:tint="?attr/colorControlNormal"
    android:viewportWidth="24"
    android:viewportHeight="24">
    <path
Loading