mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Fix NullPointerException
This commit is contained in:
@@ -17,6 +17,7 @@
|
||||
package org.thoughtcrime.securesms;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
import android.content.res.TypedArray;
|
||||
@@ -595,9 +596,17 @@ public class ConversationListFragment extends Fragment
|
||||
@Override
|
||||
public void handleEvent(@NonNull DcEvent event) {
|
||||
if (event.getId() == DcContext.DC_EVENT_CONNECTIVITY_CHANGED) {
|
||||
((ConversationListActivity) getActivity()).refreshTitle();
|
||||
Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
((ConversationListActivity) activity).refreshTitle();
|
||||
}
|
||||
|
||||
} else if (event.getId() == DcContext.DC_EVENT_SELFAVATAR_CHANGED) {
|
||||
((ConversationListActivity) getActivity()).refreshAvatar();
|
||||
Activity activity = getActivity();
|
||||
if (activity != null) {
|
||||
((ConversationListActivity) activity).refreshAvatar();
|
||||
}
|
||||
|
||||
} else {
|
||||
loadChatlistAsync();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user