another possible fix for notificationgate
This commit is contained in:
parent
baf0d64787
commit
a5de5060a9
|
@ -407,9 +407,8 @@ public class ConversationActivity extends XmppActivity {
|
|||
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
if (xmppConnectionServiceBound) {
|
||||
this.registerListener();
|
||||
xmppConnectionService.setOnConversationListChangedListener(this.onConvChanged);
|
||||
}
|
||||
if (conversationList.size()>=1) {
|
||||
onConvChanged.onConversationListChanged();
|
||||
}
|
||||
|
@ -427,8 +426,7 @@ public class ConversationActivity extends XmppActivity {
|
|||
@Override
|
||||
void onBackendConnected() {
|
||||
|
||||
xmppConnectionService.setOnConversationListChangedListener(this.onConvChanged);
|
||||
|
||||
this.registerListener();
|
||||
if (conversationList.size()==0) {
|
||||
conversationList.addAll(xmppConnectionService
|
||||
.getConversations());
|
||||
|
@ -472,6 +470,12 @@ public class ConversationActivity extends XmppActivity {
|
|||
}
|
||||
}
|
||||
}
|
||||
public void registerListener() {
|
||||
if (xmppConnectionServiceBound) {
|
||||
xmppConnectionService.setOnConversationListChangedListener(this.onConvChanged);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
|
||||
super.onActivityResult(requestCode, resultCode, data);
|
||||
|
|
|
@ -13,7 +13,6 @@ import net.java.otr4j.session.SessionStatus;
|
|||
import eu.siacs.conversations.R;
|
||||
import eu.siacs.conversations.crypto.PgpEngine.OpenPgpException;
|
||||
import eu.siacs.conversations.crypto.PgpEngine.UserInputRequiredException;
|
||||
import eu.siacs.conversations.entities.Account;
|
||||
import eu.siacs.conversations.entities.Contact;
|
||||
import eu.siacs.conversations.entities.Conversation;
|
||||
import eu.siacs.conversations.entities.Message;
|
||||
|
@ -24,8 +23,6 @@ import eu.siacs.conversations.utils.PhoneHelper;
|
|||
import eu.siacs.conversations.utils.UIHelper;
|
||||
import android.app.AlertDialog;
|
||||
import android.app.Fragment;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.Context;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.IntentSender;
|
||||
|
@ -40,10 +37,8 @@ import android.os.Bundle;
|
|||
import android.preference.PreferenceManager;
|
||||
import android.util.Log;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.view.View.OnTouchListener;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.EditText;
|
||||
|
@ -335,6 +330,7 @@ public class ConversationFragment extends Fragment {
|
|||
|
||||
public void onBackendConnected() {
|
||||
final ConversationActivity activity = (ConversationActivity) getActivity();
|
||||
activity.registerListener();
|
||||
this.conversation = activity.getSelectedConversation();
|
||||
this.selfBitmap = findSelfPicture();
|
||||
updateMessages();
|
||||
|
|
Loading…
Reference in a new issue