Fix crash

This commit is contained in:
Arne 2024-09-28 22:23:26 +02:00
parent 3dbe1d2dc8
commit 996dd70a50

View file

@ -2034,7 +2034,7 @@ public class ConversationFragment extends XmppFragment
return true;
});
if (activity.xmppConnectionService.getBooleanPreference("message_autocomplete", R.bool.message_autocomplete)) {
if (activity != null && activity.xmppConnectionService != null && activity.xmppConnectionService.getBooleanPreference("message_autocomplete", R.bool.message_autocomplete)) {
Autocomplete.<MucOptions.User>on(binding.textinput)
.with(activity.getDrawable(R.drawable.input_bubble_light))
.with(new CharPolicy('@'))
@ -3312,7 +3312,7 @@ public class ConversationFragment extends XmppFragment
}
private void updateChatBG() {
if (activity != null) {
if (activity != null && conversation != null && conversation.getUuid() != null) {
if (activity.unicoloredBG()) {
binding.conversationsFragment.setBackgroundResource(0);
binding.conversationsFragment.setBackgroundColor(StyledAttributes.getColor(activity, R.attr.color_background_tertiary));