Removes the now-unnecessary user-specific methods from the category and tag repositories. The repositories are now user-specific at the box level, so filtering by user ID within the repository methods is redundant.
Also, removes now-unused imports related to user logic in category and tag list pages, and the add transaction dialog.
This commit refactors the data repositories to remove user-specific filtering. It simplifies the data access logic by retrieving all data from the Hive boxes and removing the need to filter by `userId` in the repository methods.
This change makes the app function in single-user mode and removes the need to manage multiple user contexts within the data layer.
Specifically:
- Removes `userId` parameter from repository methods.
- Updates the setting repository to use fixed keys.
- Removes user ID filtering from queries.
- Removes user ID parameters from Cubits and Blocs
- Updates initial data creation
Improves the management of Hive boxes by introducing separate initialization for global and user-specific data.
This change enhances data isolation and allows for dynamic dependency injection based on the authentication state. It introduces `initGlobalDependencies` and `initUserSpecificDependencies` to manage the application's dependencies. User-scoped repositories and cubits are now registered/unregistered upon login/logout. The UserCubit is updated to allow dynamic injection of user-specific repositories after authentication. The TagCubit is refactored to use a repository.
Adds the necessary classes and configurations to store and retrieve SMS handler settings using Hive database.
This includes registering the `SmsHandlerSettings` model, its adapter, and related enum adapters with Hive, opening a new box for storing settings and making it accessible via `HiveService`. Additionally, this change registers a new repository for accessing sms handler settings data.
This commit refactors the user management system to utilize UserCubit, improving state management and separation of concerns.
- Replaces UserService with UserCubit for managing user state.
- Introduces AppSettings and GlobalSettings models and repositories for managing app-level settings and configurations.
- Modifies dependency injection to register the new repositories and cubits.
- Updates UI components (LoginPage, SettingsPage, HomePage, AddTransactionDialog, CategoryListPage, TagListPage) to interact with UserCubit and SettingsCubit.
- Removes direct dependency on UserRepository in favor of UserCubit for accessing user information.
- Streamlines the authentication process by using UserCubit to handle user creation and login.
- Improves settings management by using dedicated repositories and cubits for app settings.
Implements the ability to load and process SMS messages to automatically create transaction records.
This includes:
- Adding an `SmsMessage` model and Hive adapter.
- Creating an `ISmsMessageRepository` and its Hive implementation.
- Integrating SMS loading functionality into the `SmsCubit`.
- Adding a UI element in settings to trigger SMS loading.
- Persisting last SMS sync time in user preferences.