Skip to content

Commit 83ea634

Browse files
authored
fix: avoid calling notifyDataSetChanged() immediately after submitList() (#556)
Need to switch to payloads.
1 parent 9e08457 commit 83ea634

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

app/src/main/kotlin/org/fossify/phone/adapters/RecentCallsAdapter.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,11 @@ class RecentCallsAdapter(
314314
fun updateItems(newItems: List<CallLogItem>, highlightText: String = "") {
315315
if (textToHighlight != highlightText) {
316316
textToHighlight = highlightText
317-
submitList(newItems)
318-
notifyDataSetChanged()
317+
submitList(newItems) {
318+
recyclerView.post {
319+
notifyDataSetChanged()
320+
}
321+
}
319322
finishActMode()
320323
} else {
321324
submitList(newItems)

0 commit comments

Comments
 (0)