aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2017-02-22 22:39:25 +0100
committerChristian Schneppe <christian@pix-art.de>2017-02-22 22:39:25 +0100
commit7a20a0778e7aa31840d028b57f367a66c994ea5d (patch)
treebb9ad3bc42da9cc7771363a66ee03bdd61e894e7 /src/main/java/de/pixart/messenger
parent1e4f06d04de38021a8cd62c386261103ebebccb6 (diff)
reworked reconnect in profile settings
Diffstat (limited to 'src/main/java/de/pixart/messenger')
-rw-r--r--src/main/java/de/pixart/messenger/ui/EditAccountActivity.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
index 9b8a756c3..c578a5931 100644
--- a/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/EditAccountActivity.java
@@ -720,13 +720,11 @@ public class EditAccountActivity extends OmemoActivity implements OnAccountUpdat
public boolean onOptionsItemSelected(final MenuItem item) {
switch (item.getItemId()) {
case R.id.mgmt_account_reconnect:
- if (xmppConnectionServiceBound) {
- unbindService(mConnection);
- xmppConnectionServiceBound = false;
+ XmppConnection connection = mAccount.getXmppConnection();
+ if (connection != null) {
+ connection.resetStreamId();
}
- stopService(new Intent(EditAccountActivity.this,
- XmppConnectionService.class));
- finish();
+ xmppConnectionService.reconnectAccountInBackground(mAccount);
break;
case R.id.action_show_block_list:
final Intent showBlocklistIntent = new Intent(this, BlocklistActivity.class);