Browse Source

Fixes

main
M66B 6 years ago
parent
commit
5f6f552b6b
6 changed files with 9 additions and 6 deletions
  1. +4
    -2
      app/src/main/java/eu/faircode/email/ActivityBase.java
  2. +1
    -1
      app/src/main/java/eu/faircode/email/FragmentAccount.java
  3. +1
    -0
      app/src/main/java/eu/faircode/email/FragmentCompose.java
  4. +1
    -1
      app/src/main/java/eu/faircode/email/FragmentIdentity.java
  5. +1
    -1
      app/src/main/java/eu/faircode/email/FragmentMessage.java
  6. +1
    -1
      app/src/main/java/eu/faircode/email/SimpleTask.java

+ 4
- 2
app/src/main/java/eu/faircode/email/ActivityBase.java View File

@ -69,8 +69,10 @@ abstract class ActivityBase extends AppCompatActivity implements SharedPreferenc
@Override @Override
public void onSharedPreferenceChanged(SharedPreferences prefs, String key) { public void onSharedPreferenceChanged(SharedPreferences prefs, String key) {
Log.i(Helper.TAG, "Preference " + key + "=" + prefs.getAll().get(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<>(); private List<IBackPressedListener> backPressedListeners = new ArrayList<>();


+ 1
- 1
app/src/main/java/eu/faircode/email/FragmentAccount.java View File

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


+ 1
- 0
app/src/main/java/eu/faircode/email/FragmentCompose.java View File

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


+ 1
- 1
app/src/main/java/eu/faircode/email/FragmentIdentity.java View File

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


+ 1
- 1
app/src/main/java/eu/faircode/email/FragmentMessage.java View File

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


+ 1
- 1
app/src/main/java/eu/faircode/email/SimpleTask.java View File

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


Loading…
Cancel
Save