Skip to content

Commit 3c8c98b

Browse files
Handle TAGS_PAYLOAD in ResourcesAdapter to prevent full row rebinds
Explicitly handles `TAGS_PAYLOAD` in `ResourcesAdapter.onBindViewHolder` to efficiently update the tag-cloud using `displayTagCloud` without triggering a full row rebind. Reduces overhead when only tags are modified. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
1 parent e6c54f7 commit 3c8c98b

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

app/src/main/java/org/ole/planet/myplanet/ui/resources/ResourcesAdapter.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ class ResourcesAdapter(
194194
}
195195
handled = true
196196
}
197+
if (payloads.contains(TAGS_PAYLOAD)) {
198+
displayTagCloud(holder, position)
199+
handled = true
200+
}
197201
if (!handled) {
198202
super.onBindViewHolder(holder, position, payloads)
199203
}

0 commit comments

Comments
 (0)