Skip to content

fix: remove favorite marker from map immediately after deletion - #1636

Open
sim6 wants to merge 1 commit into
nextcloud:masterfrom
sim6:fix_remove_favorite_marker_from_map_immediately_after_deletion
Open

fix: remove favorite marker from map immediately after deletion#1636
sim6 wants to merge 1 commit into
nextcloud:masterfrom
sim6:fix_remove_favorite_marker_from_map_immediately_after_deletion

Conversation

@sim6

@sim6 sim6 commented Jul 23, 2026

Copy link
Copy Markdown

Replace this.$delete() with native delete in all favorite deletion paths (single delete, bulk delete, category unlink).

this.$delete() is a Vue 2 compatibility shim that may not reliably trigger Vue 3's Proxy-based reactivity system when removing keys from a reactive object. This caused the FavoritesLayer deep watcher on displayedFavorites to not fire, leaving stale markers on the map until a full reload.

In Vue 3, the native delete operator is intercepted by the Proxy's deleteProperty trap, which properly triggers reactivity.

Affected methods:

  • onFavoriteDelete (single favorite via sidebar/popup)
  • onFavoritesDelete (bulk delete via cluster right-click)
  • onDeleteFavoriteCategoryFromMap (unlink shared category)

Replace `this.$delete()` with native `delete` in all favorite
deletion paths (single delete, bulk delete, category unlink).

`this.$delete()` is a Vue 2 compatibility shim that may not reliably
trigger Vue 3's Proxy-based reactivity system when removing keys from a
reactive object. This caused the FavoritesLayer deep watcher on
displayedFavorites to not fire, leaving stale markers on the map until
a full reload.

In Vue 3, the native `delete` operator is intercepted by the Proxy's
deleteProperty trap, which properly triggers reactivity.

Affected methods:
- onFavoriteDelete (single favorite via sidebar/popup)
- onFavoritesDelete (bulk delete via cluster right-click)
- onDeleteFavoriteCategoryFromMap (unlink shared category)

Signed-off-by: Simó Albert i Beltran <sim6@probeta.net>
@sim6

sim6 commented Jul 29, 2026

Copy link
Copy Markdown
Author

@CarlSchwan Could you review it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant