|
|
|
@ -43,6 +43,7 @@ import androidx.annotation.NonNull;
|
|
|
|
|
import androidx.annotation.Nullable;
|
|
|
|
|
import androidx.appcompat.widget.SwitchCompat;
|
|
|
|
|
import androidx.constraintlayout.widget.Group;
|
|
|
|
|
import androidx.lifecycle.Lifecycle;
|
|
|
|
|
import androidx.preference.PreferenceManager;
|
|
|
|
|
|
|
|
|
|
public class FragmentOptionsMisc extends FragmentBase implements SharedPreferences.OnSharedPreferenceChangeListener {
|
|
|
|
@ -210,9 +211,11 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
|
|
|
|
|
setOptions();
|
|
|
|
|
if ("last_cleanup".equals(key))
|
|
|
|
|
setLastCleanup(prefs.getLong(key, -1));
|
|
|
|
|
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED)) {
|
|
|
|
|
setOptions();
|
|
|
|
|
if ("last_cleanup".equals(key))
|
|
|
|
|
setLastCleanup(prefs.getLong(key, -1));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|