Skip to content

Additional bloc architecture improvements#2064

Merged
hjiangsu merged 2 commits intodevelopfrom
feat/bloc-rearchitecture-2
Mar 13, 2026
Merged

Additional bloc architecture improvements#2064
hjiangsu merged 2 commits intodevelopfrom
feat/bloc-rearchitecture-2

Conversation

@hjiangsu
Copy link
Member

Pull Request Description

This PR is a continuation of previous work to help improve the overall bloc architecture. The main changes include:

  • Improvements in session handling within the app. ProfileBloc has been split up into SessionBloc and ProfileBloc. SessionBloc handles initializing, adding, removing, and switching between accounts while ProfileBloc is used to handle the account's data (e.g., user information, subscriptions, favourites, etc.).
  • Split up UserSettingsBloc into AccountSettingsCubit, UserBlocksCubit and UserMediaCubit to improve separation of concerns, and re-worked the settings pages to use the new blocs.
  • Converted some blocs into cubits to simplify logic, and other miscellaneous changes related to session handling/switching and account resolution.

I've also included an experimental refactor of the image viewer which doesn't rely on extended_image (the eventual goal is to remove extended_image as a dependency). This is enabled when experimental settings are enabled. Additionally, I've removed the tests temporarily as I want to completely re-do the test suite to better catch regressions in the future.

There will likely be follow up PRs to further clean up the codebase but this has gotten pretty large already 😅

Issue Being Fixed

Issue Number: N/A

Screenshots / Recordings

Checklist

  • If a new package was added, did you ensure it uses an appropriate license and is actively maintained?
  • Did you use localized strings (and added appropriate descriptions) where applicable?
  • Did you add semanticLabels where applicable for accessibility?

@hjiangsu hjiangsu merged commit 8f4242a into develop Mar 13, 2026
1 check passed
@hjiangsu hjiangsu deleted the feat/bloc-rearchitecture-2 branch March 13, 2026 16:46
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