Conversation
|
Hi, is there anything else required on this from my side? |
Hi @coderGtm, thank you for your contribution, and sorry for the delay. We will take a look at your PR as soon as possible! |
|
Thank you again for your contributions. I've reviewed the changes, and I think this could create an issue when undoing the block. Undoing the blocking whitelists the blog and restores the posts, but doesn’t restore is_following. So So, could you take another look into that? |
|
Thanks for the thorough review. You're right, and I've identified and fixed it now.
Edge cases covered: |
Description
Fixes #21146. In Reader → Subscriptions, blocking a site via the post overflow menu ("Block this site") hid the post but left the "N Blog" filter pill showing a stale count until pull-to-refresh.
The pill count (
blogsFilterCountinReaderViewModel.TopBarUiState) is recomputed only whenSubFilterViewModel.subFiltersre-emits, which happens solely when theReaderEvents.FollowedBlogsFetchedevent is posted — previously only byReaderUpdateLogicduring a full tags/blogs sync (the pull-to-refresh path). The block flow refreshed the posts adapter and mutated the DB but never emitted this event.This PR makes
handleBlockSiteClickedemitFollowedBlogsFetched(with the fresh count fromReaderBlogTableWrapper.getFollowedBlogs()) after every DB mutation: on local block, on snackbar undo, and onRequestFailed(whose failure path re-follows the blog). The pill now updates immediately to "0 Blogs".Testing instructions
Blocking a site in the Subscriptions tab:
Undoing a blocked site:
Blocking a site fails (no network / request failure):
Regression check — other Reader entry points:
Screen recording
Screen_recording_20260903_174715.webm