Nelle mie statistiche è indicato che ho 4 segnalibri:
Ma nella mia pagina dei segnalibri non ne ho nessuno:
Penso che questo sia dovuto al fatto che non ho più accesso a quegli 4 argomenti o messaggi privati.
Se è così… Penso che la statistica dei segnalibri dovrebbe essere azzerata se non si ha più accesso ad essi, dato che non è più possibile eliminarli autonomamente.
5 Mi Piace
Ottimo lavoro @JammyDodger
Questo sarà risolto da
main ← fix-bookmark-count
opened 10:52AM - 24 Dec 25 UTC
Previously, `UserSummary#bookmark_count` used a simple `Bookmark.where(user:).co… unt` which included bookmarks for content the user could no longer access (e.g., topics moved to private categories, deleted posts, or PMs they were removed from). This caused a mismatch where users saw "4 bookmarks" in their profile stats but an empty bookmark page.
Added `BookmarkQuery#count_all` that reuses the same access-filtered UNION query as `list_all`, ensuring the count reflects only accessible bookmarks.
Also refactored `BookmarkQuery` for clarity:
- Extracted `build_list_queries` to share query building between `count_all` and `list_all`
- Extracted helper methods in `unread_notifications`: `fetch_reminder_notifications`, `load_deleted_bookmarkables`, `can_see_notification_bookmark?`
- Removed verbose comments and debug SQL formatting
Ref - https://meta.discourse.org/t/391822
2 Mi Piace