mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-27 19:22:15 -05:00
invoke statusChanged callback after syncronization
This commit is contained in:
parent
5a5eb5bdd3
commit
51d1223198
@ -218,9 +218,10 @@ public class XmppConnection implements Runnable {
|
||||
mXmppConnectionService = service;
|
||||
}
|
||||
|
||||
protected synchronized void changeStatus(final Account.State nextStatus) {
|
||||
protected void changeStatus(final Account.State nextStatus) {
|
||||
synchronized (this) {
|
||||
if (Thread.currentThread().isInterrupted()) {
|
||||
Log.d(Config.LOGTAG,account.getJid().toBareJid()+": not changing status to "+nextStatus+" because thread was interrupted");
|
||||
Log.d(Config.LOGTAG, account.getJid().toBareJid() + ": not changing status to " + nextStatus + " because thread was interrupted");
|
||||
return;
|
||||
}
|
||||
if (account.getStatus() != nextStatus) {
|
||||
@ -234,11 +235,14 @@ public class XmppConnection implements Runnable {
|
||||
this.attempt = 0;
|
||||
}
|
||||
account.setStatus(nextStatus);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (statusListener != null) {
|
||||
statusListener.onStatusChanged(account);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void prepareNewConnection() {
|
||||
this.lastConnect = SystemClock.elapsedRealtime();
|
||||
|
Loading…
Reference in New Issue
Block a user