This commit is contained in:
M66B
2018-08-21 18:00:06 +00:00
parent af4ab0aeda
commit 5f6f552b6b
6 changed files with 9 additions and 6 deletions

View File

@@ -69,8 +69,10 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
@Override
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
Log.i(Helper.TAG, "Preference " + key + "=" + prefs.getAll().get(key));
if ("theme".equals(key) || "debug".equals(key))
recreate();
if ("theme".equals(key) || "debug".equals(key)) {
finish();
startActivity(getIntent());
}
}
private List<IBackPressedListener> backPressedListeners = new ArrayList<>();

View File

@@ -587,9 +587,9 @@ public class FragmentAccount extends FragmentEx {
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putInt("provider", spProvider.getSelectedItemPosition());
outState.putString("password", tilPassword.getEditText().getText().toString());
super.onSaveInstanceState(outState);
}
@Override

View File

@@ -311,6 +311,7 @@ public class FragmentCompose extends FragmentEx {
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
if (autosave)
onAction(R.id.action_save);
outState.putLong("working", working);

View File

@@ -375,10 +375,10 @@ public class FragmentIdentity extends FragmentEx {
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putInt("account", spAccount.getSelectedItemPosition());
outState.putInt("provider", spProvider.getSelectedItemPosition());
outState.putString("password", tilPassword.getEditText().getText().toString());
super.onSaveInstanceState(outState);
}
@Override

View File

@@ -291,10 +291,10 @@ public class FragmentMessage extends FragmentEx {
@Override
public void onSaveInstanceState(Bundle outState) {
super.onSaveInstanceState(outState);
outState.putBoolean("free", free);
outState.putInt("addresses", grpAddresses.getVisibility());
outState.putInt("attachments", rvAttachment.getVisibility());
super.onSaveInstanceState(outState);
}
@Override

View File

@@ -80,7 +80,7 @@ public abstract class SimpleTask<T> implements LifecycleObserver {
@OnLifecycleEvent(Lifecycle.Event.ON_STOP)
public void onStop() {
Log.i(Helper.TAG, "Resume tak " + this);
Log.i(Helper.TAG, "Stop task " + this);
}
@OnLifecycleEvent(Lifecycle.Event.ON_RESUME)