Taksh 2f167b8403 Drop bookmark name resolution that lands after the bookmark is gone
resolveNameIfNeeded launches a reverse geocode on Dispatchers.IO and never
cancels it. If the bookmark is removed, or wiped by clearAll, while that
lookup is in flight, the coroutine still writes the resolved place name into
_bookmarkNames and persists it to SharedPreferences.

clearAll is the panic path (ChatViewModel clears bookmarks so "panic should
remove everything"), and its "clear any in-flight resolutions to avoid
repopulating" comment does not hold: emptying the resolving set does not stop
the coroutine that is already running. The result is a geocoded location name
left on disk after a panic wipe, visible again on the next launch.

Commit the resolved name through commitResolvedName, which drops it unless the
geohash is still bookmarked. membership is now read from the IO dispatcher, so
guard the accessors that touch it and move the resolving bookkeeping behind the
same lock.
2026-10-05 16:16:07 +05:30
..
2025-12-14 21:55:41 +07:00
2026-07-29 03:41:16 +02:00