Merge pull request #5178 from Isira-Seneviratne/Use_ActivityCompat_recreate
Use ActivityCompat.recreate().
This commit is contained in:
commit
9bea46744b
3 changed files with 7 additions and 7 deletions
|
|
@ -8,6 +8,7 @@ import android.provider.Settings;
|
|||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.core.app.ActivityCompat;
|
||||
import androidx.preference.Preference;
|
||||
|
||||
import org.schabi.newpipe.R;
|
||||
|
|
@ -31,7 +32,7 @@ public class AppearanceSettingsFragment extends BasePreferenceFragment {
|
|||
|
||||
if (!newValue.equals(startThemeKey) && getActivity() != null) {
|
||||
// If it's not the current theme
|
||||
getActivity().recreate();
|
||||
ActivityCompat.recreate(requireActivity());
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue