mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-05 00:35:01 -05:00
tryping to fix #24 - notificationgate - since i still cant reproduce this patches are all blind
This commit is contained in:
parent
9fa95f50ae
commit
0b235171a8
@ -394,11 +394,14 @@ public class ConversationActivity extends XmppActivity {
|
||||
return super.onKeyDown(keyCode, event);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
this.registerListener();
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
|
||||
this.useSubject = preferences.getBoolean("use_subject_in_muc", true);
|
||||
if (this.xmppConnectionServiceBound) {
|
||||
this.onBackendConnected();
|
||||
}
|
||||
if (conversationList.size()>=1) {
|
||||
onConvChanged.onConversationListChanged();
|
||||
}
|
||||
@ -406,7 +409,6 @@ public class ConversationActivity extends XmppActivity {
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
Log.d("gultsch","called on stop in conversation activity");
|
||||
if (xmppConnectionServiceBound) {
|
||||
xmppConnectionService.removeOnConversationListChangedListener();
|
||||
}
|
||||
|
@ -115,6 +115,7 @@ public class ConversationFragment extends Fragment {
|
||||
startActivity(intent);
|
||||
}
|
||||
};
|
||||
private ConversationActivity activity;
|
||||
|
||||
public void hidePgpPassphraseBox() {
|
||||
pgpInfo.setVisibility(View.GONE);
|
||||
@ -325,16 +326,21 @@ public class ConversationFragment extends Fragment {
|
||||
@Override
|
||||
public void onStart() {
|
||||
super.onStart();
|
||||
ConversationActivity activity = (ConversationActivity) getActivity();
|
||||
this.activity = (ConversationActivity) getActivity();
|
||||
SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(activity);
|
||||
this.useSubject = preferences.getBoolean("use_subject_in_muc", true);
|
||||
if (activity.xmppConnectionServiceBound) {
|
||||
this.onBackendConnected();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onResume() {
|
||||
super.onResume();
|
||||
activity.registerListener();
|
||||
}
|
||||
|
||||
public void onBackendConnected() {
|
||||
final ConversationActivity activity = (ConversationActivity) getActivity();
|
||||
activity.registerListener();
|
||||
this.conversation = activity.getSelectedConversation();
|
||||
if (this.conversation == null) {
|
||||
|
@ -19,6 +19,9 @@ import android.view.View;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
|
||||
public abstract class XmppActivity extends Activity {
|
||||
|
||||
protected final static String LOGTAG = "xmppService";
|
||||
|
||||
public XmppConnectionService xmppConnectionService;
|
||||
public boolean xmppConnectionServiceBound = false;
|
||||
protected boolean handledViewIntent = false;
|
||||
|
Loading…
Reference in New Issue
Block a user