forked from mirror/monocles_chat_clean
Drawer link always goes to manage accounts
(cherry picked from commit 1220581b44b96c64e8c83e9f7305b8daecbe8f38)
This commit is contained in:
parent
f5ecb4bce0
commit
29281d46b7
1 changed files with 2 additions and 15 deletions
|
@ -467,7 +467,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
|
|||
accountHeader = new com.mikepenz.materialdrawer.widget.AccountHeaderView(this);
|
||||
final var manageAccount = new com.mikepenz.materialdrawer.model.ProfileSettingDrawerItem();
|
||||
manageAccount.setIdentifier(DRAWER_MANAGE_ACCOUNT);
|
||||
com.mikepenz.materialdrawer.model.interfaces.NameableKt.setNameText(manageAccount, xmppConnectionService.getAccounts().size() > 1 ? getString(R.string.title_activity_manage_accounts) : getString(R.string.manage_account));
|
||||
com.mikepenz.materialdrawer.model.interfaces.NameableKt.setNameText(manageAccount, getString(R.string.title_activity_manage_accounts));
|
||||
com.mikepenz.materialdrawer.model.interfaces.IconableKt.setIconRes(manageAccount, R.drawable.ic_settings_24dp);
|
||||
accountHeader.addProfiles(manageAccount);
|
||||
|
||||
|
@ -593,12 +593,7 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
|
|||
if (isCurrent) return false; // Ignore switching to already selected profile
|
||||
|
||||
if (id == DRAWER_MANAGE_ACCOUNT) {
|
||||
final Account account = (Account) accountHeader.getActiveProfile().getTag();
|
||||
if (account == null) {
|
||||
AccountUtils.launchManageAccounts(this);
|
||||
} else {
|
||||
switchToAccount(account);
|
||||
}
|
||||
AccountUtils.launchManageAccounts(this);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -613,14 +608,6 @@ public class ConversationsActivity extends XmppActivity implements OnConversatio
|
|||
return false;
|
||||
}
|
||||
|
||||
// Clicked on an actual profile
|
||||
if (profile.getTag() == null) {
|
||||
com.mikepenz.materialdrawer.model.interfaces.NameableKt.setNameText(manageAccount, getString(R.string.title_activity_manage_accounts));
|
||||
} else {
|
||||
com.mikepenz.materialdrawer.model.interfaces.NameableKt.setNameText(manageAccount, getString(R.string.manage_account));
|
||||
}
|
||||
accountHeader.updateProfile(manageAccount);
|
||||
|
||||
final var fm = getFragmentManager();
|
||||
while (fm.getBackStackEntryCount() > 0) {
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue