diff --git a/app/src/main/java/com/hiddenramblings/tagmo/adapter/BrowserAdapter.kt b/app/src/main/java/com/hiddenramblings/tagmo/adapter/BrowserAdapter.kt index 5a37bee6b..40273a93e 100644 --- a/app/src/main/java/com/hiddenramblings/tagmo/adapter/BrowserAdapter.kt +++ b/app/src/main/java/com/hiddenramblings/tagmo/adapter/BrowserAdapter.kt @@ -217,7 +217,7 @@ class BrowserAdapter( @SuppressLint("NotifyDataSetChanged") override fun publishResults(charSequence: CharSequence?, filterResults: FilterResults) { if (filteredData === filterResults.values) return - filterResults.values.let { filteredData = it as ArrayList } + filterResults.values?.let { filteredData = it as ArrayList } if (itemCount > 0) Collections.sort(filteredData, AmiiboFileComparator(settings)) notifyDataSetChanged() } diff --git a/app/src/main/java/com/hiddenramblings/tagmo/adapter/FoomiiboAdapter.kt b/app/src/main/java/com/hiddenramblings/tagmo/adapter/FoomiiboAdapter.kt index e4c8a7f3c..a7b6760f7 100644 --- a/app/src/main/java/com/hiddenramblings/tagmo/adapter/FoomiiboAdapter.kt +++ b/app/src/main/java/com/hiddenramblings/tagmo/adapter/FoomiiboAdapter.kt @@ -168,7 +168,7 @@ class FoomiiboAdapter( @SuppressLint("NotifyDataSetChanged") override fun publishResults(charSequence: CharSequence?, filterResults: FilterResults) { if (filteredData === filterResults.values) return - filterResults.values.let { filteredData = it as ArrayList } + filterResults.values?.let { filteredData = it as ArrayList } if (itemCount > 0) { Collections.sort(filteredData, AmiiboComparator(settings)) val missingFiles: ArrayList = arrayListOf()