aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2018-10-20 14:06:01 +0200
committerChristian Schneppe <christian@pix-art.de>2018-10-20 14:06:01 +0200
commitc6d6b3e3f25a1c79508a45325a88f538770ac2b5 (patch)
tree1da81617e63f4c13b234f66d020c6a8862660439 /src/main/java/de
parenteed9c5340d287a098e95e1709ac06e45953ab1ae (diff)
code cleanup / reformat in ShareViaAccount
Diffstat (limited to 'src/main/java/de')
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java3
-rw-r--r--src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java34
2 files changed, 15 insertions, 22 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index 844be322f..3ac16ea2b 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -264,7 +264,8 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
if (mAccount != null
&& mAccount.getStatus() != Account.State.ONLINE
&& mFetchingAvatar) {
- startActivity(new Intent(getApplicationContext(), ManageAccountActivity.class));
+ //TODO: maybe better redirect to StartConversationActivity
+ startActivity(new Intent(this, ManageAccountActivity.class));
overridePendingTransition(R.animator.fade_in, R.animator.fade_out);
finish();
} else if (mInitMode && mAccount != null && mAccount.getStatus() == Account.State.ONLINE) {
diff --git a/src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java b/src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java
index 7aa0d3f64..7e457bf5c 100644
--- a/src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ShareViaAccountActivity.java
@@ -2,9 +2,6 @@ package de.pixart.messenger.ui;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.AdapterView.OnItemClickListener;
import android.widget.ListView;
import java.util.ArrayList;
@@ -46,27 +43,22 @@ public class ShareViaAccountActivity extends XmppActivity {
setSupportActionBar(findViewById(R.id.toolbar));
configureActionBar(getSupportActionBar());
accountListView = findViewById(R.id.account_list);
- this.mAccountAdapter = new AccountAdapter(this, accountList);
+ this.mAccountAdapter = new AccountAdapter(this, accountList, false);
accountListView.setAdapter(this.mAccountAdapter);
- accountListView.setOnItemClickListener(new OnItemClickListener() {
-
- @Override
- public void onItemClick(AdapterView<?> arg0, View view,
- int position, long arg3) {
- final Account account = accountList.get(position);
- final String body = getIntent().getStringExtra(EXTRA_BODY);
-
- try {
- final Jid contact = Jid.of(getIntent().getStringExtra(EXTRA_CONTACT));
- final Conversation conversation = xmppConnectionService.findOrCreateConversation(
- account, contact, false, false);
- switchToConversation(conversation, body, false);
- } catch (IllegalArgumentException e) {
- // ignore error
- }
+ accountListView.setOnItemClickListener((arg0, view, position, arg3) -> {
+ final Account account = accountList.get(position);
+ final String body = getIntent().getStringExtra(EXTRA_BODY);
- finish();
+ try {
+ final Jid contact = Jid.of(getIntent().getStringExtra(EXTRA_CONTACT));
+ final Conversation conversation = xmppConnectionService.findOrCreateConversation(
+ account, contact, false, false);
+ switchToConversation(conversation, body, false);
+ } catch (IllegalArgumentException e) {
+ // ignore error
}
+
+ finish();
});
}