From 8717c8587ee012001842a86fd6afbcd4b698ea59 Mon Sep 17 00:00:00 2001 From: Austin Huang Date: Fri, 16 Jul 2021 11:48:19 -0400 Subject: [PATCH] close #1661 --- .../java/awais/instagrabber/fragments/UserSearchFragment.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/awais/instagrabber/fragments/UserSearchFragment.kt b/app/src/main/java/awais/instagrabber/fragments/UserSearchFragment.kt index a72be70a..7742c960 100644 --- a/app/src/main/java/awais/instagrabber/fragments/UserSearchFragment.kt +++ b/app/src/main/java/awais/instagrabber/fragments/UserSearchFragment.kt @@ -208,7 +208,8 @@ class UserSearchFragment : Fragment() { if (childCount == 0) return null for (i in childCount - 1 downTo 0) { val child = binding.group.getChildAt(i) ?: continue - val tag = child.tag as RankedRecipient + val tempTag = child.tag ?: continue + val tag = tempTag as RankedRecipient if (isUser && tag.user == null || !isUser && tag.thread == null) continue if (isUser && tag.user?.pk == recipient.user?.pk || !isUser && tag.thread?.threadId == recipient.thread?.threadId) { return child