Skip to content

Conversation

@jbsession
Copy link
Owner

This PR updates the viewmodel (and some UI implementation) to use Flow.

Legacy LiveData bridges are kept as to not break or have minimal changes in the UI while refactor is in progress.

@jbsession jbsession self-assigned this Dec 16, 2025
if (selected == null) {
selected = LinkedList()
}
val selected: MutableList<Media> = selectedMediaOrDefault.toMutableList()
Copy link

@ThomasSession ThomasSession Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is that the same logic with selectedMediaOrDefault as opposed to the previous selectedMedia.value?
Are they updated and managed the same?
You seem to use _uiState.value.selectedMedia in parts and selectedMediaOrDefault in others, so just need to make sure it's all needed or their differences

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup it is the same. I also updated parts that use _uiState.value.selectedMedia to use selectedMediaOrDefault (now selectedMedia) with source of truth coming from the UiState.

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.

3 participants