mirror of
https://github.com/M66B/FairEmail.git
synced 2024-12-25 01:06:04 +00:00
Small behavior improvement
This commit is contained in:
parent
63c0b26fa1
commit
14b338e26f
2 changed files with 9 additions and 7 deletions
|
@ -250,13 +250,10 @@ public class FragmentQuickSetup extends FragmentBase {
|
|||
btnManual.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
finish();
|
||||
|
||||
FragmentAccount fragment = new FragmentAccount();
|
||||
fragment.setArguments(new Bundle());
|
||||
FragmentTransaction fragmentTransaction = getParentFragmentManager().beginTransaction();
|
||||
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("account");
|
||||
fragmentTransaction.commit();
|
||||
v.getContext().startActivity(new Intent(v.getContext(), ActivitySetup.class)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
||||
.putExtra("manual", true)
|
||||
.putExtra("scroll", true));
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -985,18 +985,23 @@ public class FragmentSetup extends FragmentBase implements SharedPreferences.OnS
|
|||
}
|
||||
|
||||
private void updateManual() {
|
||||
boolean scroll = false;
|
||||
FragmentActivity activity = getActivity();
|
||||
if (activity != null) {
|
||||
Intent intent = activity.getIntent();
|
||||
if (intent.hasExtra("manual")) {
|
||||
manual = intent.getBooleanExtra("manual", false);
|
||||
scroll = intent.getBooleanExtra("scroll", false);
|
||||
intent.removeExtra("manual");
|
||||
intent.removeExtra("scroll");
|
||||
activity.setIntent(intent);
|
||||
}
|
||||
}
|
||||
|
||||
ibManual.setImageLevel(manual ? 0 /* less */ : 1 /* more */);
|
||||
cardManual.setVisibility(manual ? View.VISIBLE : View.GONE);
|
||||
if (scroll)
|
||||
ensureVisible(cardManual);
|
||||
}
|
||||
|
||||
private void updateExtra() {
|
||||
|
|
Loading…
Reference in a new issue