catch NPE for popup bubble

catch NPE when popup bubble for unread mentions is not available anymore

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2021-09-23 10:55:31 +02:00
parent 600bb1ad41
commit 84468be617
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -626,6 +626,7 @@ public class ConversationsListController extends BaseController implements Searc
}
private void checkToShowUnreadBubble() {
try{
int lastVisibleItem = layoutManager.findLastCompletelyVisibleItemPosition();
for (AbstractFlexibleItem flexItem : callItems) {
Conversation conversationItem = ((ConversationItem) flexItem).getModel();
@ -638,6 +639,10 @@ public class ConversationsListController extends BaseController implements Searc
}
}
newMentionPopupBubble.hide();
} catch (NullPointerException e){
Log.d(TAG, "A NPE was caught when trying to show the unread popup bubble. This might happen when the " +
"user already left the conversations-list screen so the popup bubble is not available anymore.", e);
}
}
private void showNewConversationsScreen() {