code cleanup / reformat in ShareViaAccount

This commit is contained in:
Daniel Gultsch 2018-10-06 12:48:39 +02:00
parent b27fa6d206
commit 7aa8aba5c0
2 changed files with 70 additions and 75 deletions

View File

@ -278,8 +278,8 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
if (mAccount != null if (mAccount != null
&& mAccount.getStatus() != Account.State.ONLINE && mAccount.getStatus() != Account.State.ONLINE
&& mFetchingAvatar) { && mFetchingAvatar) {
startActivity(new Intent(getApplicationContext(), //TODO: maybe better redirect to StartConversationActivity
ManageAccountActivity.class)); startActivity(new Intent(this, ManageAccountActivity.class));
finish(); finish();
} else if (mInitMode && mAccount != null && mAccount.getStatus() == Account.State.ONLINE) { } else if (mInitMode && mAccount != null && mAccount.getStatus() == Account.State.ONLINE) {
if (!mFetchingAvatar) { if (!mFetchingAvatar) {

View File

@ -45,14 +45,10 @@ public class ShareViaAccountActivity extends XmppActivity {
setContentView(R.layout.activity_manage_accounts); setContentView(R.layout.activity_manage_accounts);
setSupportActionBar(findViewById(R.id.toolbar)); setSupportActionBar(findViewById(R.id.toolbar));
configureActionBar(getSupportActionBar()); configureActionBar(getSupportActionBar());
accountListView = (ListView) findViewById(R.id.account_list); accountListView = findViewById(R.id.account_list);
this.mAccountAdapter = new AccountAdapter(this, accountList, false); this.mAccountAdapter = new AccountAdapter(this, accountList, false);
accountListView.setAdapter(this.mAccountAdapter); accountListView.setAdapter(this.mAccountAdapter);
accountListView.setOnItemClickListener(new OnItemClickListener() { accountListView.setOnItemClickListener((arg0, view, position, arg3) -> {
@Override
public void onItemClick(AdapterView<?> arg0, View view,
int position, long arg3) {
final Account account = accountList.get(position); final Account account = accountList.get(position);
final String body = getIntent().getStringExtra(EXTRA_BODY); final String body = getIntent().getStringExtra(EXTRA_BODY);
@ -66,7 +62,6 @@ public class ShareViaAccountActivity extends XmppActivity {
} }
finish(); finish();
}
}); });
} }