Skip to content

Refactor: Decouple Library tab management from enum#283

Merged
theovilardo merged 1 commit intomasterfrom
codex/improve-sorting-mechanism-with-bottom-sheet
Oct 22, 2025
Merged

Refactor: Decouple Library tab management from enum#283
theovilardo merged 1 commit intomasterfrom
codex/improve-sorting-mechanism-with-bottom-sheet

Conversation

@theovilardo
Copy link
Copy Markdown
Owner

This commit removes the LibraryTabId enum and refactors the library tab management to use string identifiers. This change decouples the tab state from a rigid enum structure, making it more flexible and easier to manage.

Key changes:

  • Deleted the LibraryTabId enum and its associated test file.
  • PlayerViewModel now manages library tabs using a StateFlow<List<String>>.
  • State persistence and reordering logic now operate on lists of strings.
  • UI components, including LibraryScreen and ReorderTabsSheet, have been updated to consume string identifiers instead of the enum.
  • Simplified tab selection and data loading logic in PlayerViewModel based on the tab's index and string key.

This commit removes the `LibraryTabId` enum and refactors the library tab management to use string identifiers. This change decouples the tab state from a rigid enum structure, making it more flexible and easier to manage.

Key changes:
- Deleted the `LibraryTabId` enum and its associated test file.
- `PlayerViewModel` now manages library tabs using a `StateFlow<List<String>>`.
- State persistence and reordering logic now operate on lists of strings.
- UI components, including `LibraryScreen` and `ReorderTabsSheet`, have been updated to consume string identifiers instead of the enum.
- Simplified tab selection and data loading logic in `PlayerViewModel` based on the tab's index and string key.
@theovilardo theovilardo merged commit 5e646ae into master Oct 22, 2025
theovilardo added a commit that referenced this pull request Oct 23, 2025
…g-mechanism-with-bottom-sheet"

This reverts commit 5e646ae, reversing
changes made to adf44bc.
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