close drawer when clicking on own profile and adding account
closes #948
This commit is contained in:
parent
aae72205c3
commit
f87b87bea3
1 changed files with 3 additions and 0 deletions
|
@ -21,6 +21,7 @@ import android.graphics.Color;
|
||||||
import android.graphics.drawable.Drawable;
|
import android.graphics.drawable.Drawable;
|
||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
|
import android.os.Handler;
|
||||||
import android.support.annotation.NonNull;
|
import android.support.annotation.NonNull;
|
||||||
import android.support.annotation.Nullable;
|
import android.support.annotation.Nullable;
|
||||||
import android.support.design.widget.FloatingActionButton;
|
import android.support.design.widget.FloatingActionButton;
|
||||||
|
@ -393,11 +394,13 @@ public final class MainActivity extends BottomSheetActivity implements ActionBut
|
||||||
if (current && activeAccount != null) {
|
if (current && activeAccount != null) {
|
||||||
Intent intent = AccountActivity.getIntent(this, activeAccount.getAccountId());
|
Intent intent = AccountActivity.getIntent(this, activeAccount.getAccountId());
|
||||||
startActivityWithSlideInAnimation(intent);
|
startActivityWithSlideInAnimation(intent);
|
||||||
|
new Handler().postDelayed(() -> drawer.closeDrawer(), 100);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//open LoginActivity to add new account
|
//open LoginActivity to add new account
|
||||||
if (profile.getIdentifier() == DRAWER_ITEM_ADD_ACCOUNT) {
|
if (profile.getIdentifier() == DRAWER_ITEM_ADD_ACCOUNT) {
|
||||||
startActivityWithSlideInAnimation(LoginActivity.getIntent(this, true));
|
startActivityWithSlideInAnimation(LoginActivity.getIntent(this, true));
|
||||||
|
new Handler().postDelayed(() -> drawer.closeDrawer(), 100);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//change Account
|
//change Account
|
||||||
|
|
Loading…
Reference in a new issue