try to fix messages stuck at sending
This commit is contained in:
parent
082c06a486
commit
8d8cb92e43
|
@ -326,7 +326,7 @@ public class XmppConnectionService extends Service {
|
||||||
}
|
}
|
||||||
account.pendingConferenceJoins.clear();
|
account.pendingConferenceJoins.clear();
|
||||||
scheduleWakeUpCall(Config.PUSH_MODE ? Config.PING_MIN_INTERVAL : Config.PING_MAX_INTERVAL, account.getUuid().hashCode());
|
scheduleWakeUpCall(Config.PUSH_MODE ? Config.PING_MIN_INTERVAL : Config.PING_MAX_INTERVAL, account.getUuid().hashCode());
|
||||||
} else if (account.getStatus() == Account.State.OFFLINE) {
|
} else if (account.getStatus() == Account.State.OFFLINE || account.getStatus() == Account.State.DISABLED) {
|
||||||
resetSendingToWaiting(account);
|
resetSendingToWaiting(account);
|
||||||
final boolean disabled = account.isOptionSet(Account.OPTION_DISABLED);
|
final boolean disabled = account.isOptionSet(Account.OPTION_DISABLED);
|
||||||
final boolean listeners = checkListeners();
|
final boolean listeners = checkListeners();
|
||||||
|
@ -2891,6 +2891,7 @@ public class XmppConnectionService extends Service {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void resetSendingToWaiting(Account account) {
|
public void resetSendingToWaiting(Account account) {
|
||||||
|
Log.d(Config.LOGTAG,account.getJid().toBareJid()+": reset 'sending' messages to 'waiting'");
|
||||||
for (Conversation conversation : getConversations()) {
|
for (Conversation conversation : getConversations()) {
|
||||||
if (conversation.getAccount() == account) {
|
if (conversation.getAccount() == account) {
|
||||||
conversation.findUnsentTextMessages(new Conversation.OnMessageFound() {
|
conversation.findUnsentTextMessages(new Conversation.OnMessageFound() {
|
||||||
|
|
|
@ -1066,6 +1066,7 @@ public class XmppConnection implements Runnable {
|
||||||
mStanzaQueue.clear();
|
mStanzaQueue.clear();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mXmppConnectionService.resetSendingToWaiting(account);
|
||||||
features.carbonsEnabled = false;
|
features.carbonsEnabled = false;
|
||||||
features.blockListRequested = false;
|
features.blockListRequested = false;
|
||||||
synchronized (this.disco) {
|
synchronized (this.disco) {
|
||||||
|
|
Loading…
Reference in New Issue