Commit 1d11c4b1 authored by Grigory Fedorov's avatar Grigory Fedorov

MessageManager removed active chats on account disable. #441

parent 5b19c90a
......@@ -27,6 +27,7 @@ import com.xabber.android.data.account.AccountItem;
import com.xabber.android.data.account.AccountManager;
import com.xabber.android.data.account.ArchiveMode;
import com.xabber.android.data.account.OnAccountArchiveModeChangedListener;
import com.xabber.android.data.account.OnAccountDisabledListener;
import com.xabber.android.data.account.OnAccountRemovedListener;
import com.xabber.android.data.account.StatusMode;
import com.xabber.android.data.connection.ConnectionItem;
......@@ -68,8 +69,8 @@ import java.util.Set;
* @author alexander.ivanov
*/
public class MessageManager implements OnLoadListener, OnPacketListener, OnDisconnectListener,
OnAccountRemovedListener, OnRosterReceivedListener, OnAccountArchiveModeChangedListener,
OnStatusChangeListener {
OnAccountRemovedListener, OnAccountDisabledListener, OnRosterReceivedListener,
OnAccountArchiveModeChangedListener, OnStatusChangeListener {
private final static MessageManager instance;
......@@ -574,6 +575,11 @@ public class MessageManager implements OnLoadListener, OnPacketListener, OnDisco
chats.clear(accountItem.getAccount());
}
@Override
public void onAccountDisabled(AccountItem accountItem) {
chats.clear(accountItem.getAccount());
}
/**
* Export chat to file with specified name.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment