do not show snackbar for archived conversations. fixes glitch when leaving muc
This commit is contained in:
parent
03e88500b9
commit
c2db940594
|
@ -9,7 +9,6 @@ import android.support.annotation.StringRes;
|
||||||
import android.support.v4.app.Fragment;
|
import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentTransaction;
|
import android.support.v4.app.FragmentTransaction;
|
||||||
import android.support.v7.app.ActionBar;
|
import android.support.v7.app.ActionBar;
|
||||||
import android.util.Log;
|
|
||||||
import android.view.ActionMode;
|
import android.view.ActionMode;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
import android.view.MenuInflater;
|
import android.view.MenuInflater;
|
||||||
|
|
|
@ -1915,6 +1915,9 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
|
||||||
final XmppConnection connection = account.getXmppConnection();
|
final XmppConnection connection = account.getXmppConnection();
|
||||||
final int mode = conversation.getMode();
|
final int mode = conversation.getMode();
|
||||||
final Contact contact = mode == Conversation.MODE_SINGLE ? conversation.getContact() : null;
|
final Contact contact = mode == Conversation.MODE_SINGLE ? conversation.getContact() : null;
|
||||||
|
if (conversation.getStatus() == Conversation.STATUS_ARCHIVED) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (account.getStatus() == Account.State.DISABLED) {
|
if (account.getStatus() == Account.State.DISABLED) {
|
||||||
showSnackbar(R.string.this_account_is_disabled, R.string.enable, this.mEnableAccountListener);
|
showSnackbar(R.string.this_account_is_disabled, R.string.enable, this.mEnableAccountListener);
|
||||||
} else if (conversation.isBlocked()) {
|
} else if (conversation.isBlocked()) {
|
||||||
|
|
Loading…
Reference in New Issue