1
0
mirror of https://github.com/nextcloud/talk-android synced 2025-07-17 17:55:02 +01:00

avoid crash when clicking on header in conversation search mode

fix 

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
Marcel Hibbe 2022-04-20 20:57:58 +02:00
parent 9d1233aad2
commit 93e9b362b6
No known key found for this signature in database
GPG Key ID: C793F8B59F43CE7B

View File

@ -857,6 +857,7 @@ public class ConversationsListController extends BaseController implements Searc
@Override
public boolean onItemClick(View view, int position) {
try {
selectedConversation = ((ConversationItem) Objects.requireNonNull(adapter.getItem(position))).getModel();
if (selectedConversation != null && getActivity() != null) {
if (showShareToScreen) {
@ -869,6 +870,10 @@ public class ConversationsListController extends BaseController implements Searc
openConversation();
}
}
} catch (ClassCastException e) {
Log.w(TAG, "failed to cast clicked item to ConversationItem. Most probably a heading was clicked. This is" +
" just ignored.", e);
}
return true;
}