Migrate to DayNight Theme
This commit is contained in:
parent
464d0e50b0
commit
b3e2418b93
12 changed files with 47 additions and 23 deletions
|
|
@ -13,6 +13,7 @@ import androidx.preference.Preference;
|
|||
|
||||
import org.schabi.newpipe.R;
|
||||
import org.schabi.newpipe.util.Constants;
|
||||
import org.schabi.newpipe.util.ThemeHelper;
|
||||
|
||||
public class AppearanceSettingsFragment extends BasePreferenceFragment {
|
||||
private static final boolean CAPTIONING_SETTINGS_ACCESSIBLE =
|
||||
|
|
@ -89,6 +90,8 @@ public class AppearanceSettingsFragment extends BasePreferenceFragment {
|
|||
defaultPreferences.edit().putBoolean(Constants.KEY_THEME_CHANGE, true).apply();
|
||||
defaultPreferences.edit().putString(themeKey, newValue.toString()).apply();
|
||||
|
||||
ThemeHelper.setDayNightMode(getContext(), newValue.toString());
|
||||
|
||||
if (!newValue.equals(beginningThemeKey) && getActivity() != null) {
|
||||
// if it's not the current theme
|
||||
ActivityCompat.recreate(getActivity());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue