Skip to content

Conversation

@FineFindus
Copy link
Collaborator

@FineFindus FineFindus commented Mar 31, 2025

Fixes an issue, where the users could get soft-locked, by selecting a filter, which had no items, leading to the filter bar being hidden, and thus making the user unable to deselect the filter. This is fixed, by only hiding recyclerView/No items views.

Before After
Watch history with no filter bar Watch history with filter bar

Fixes an issue, where the users could get soft-locked, by selecting a
filter, which had no items, leading to the filter bar being hidden, and
thus making the user unable to deselect the filter.
This is fixed, by only hiding recyclerView/No items views.
viewModel.filteredWatchHistory.observe(viewLifecycleOwner) { history ->
binding.historyEmpty.isGone = history.isNotEmpty()
binding.historyContainer.isVisible = history.isNotEmpty()
binding.playAll.isEnabled = history.isNotEmpty()
Copy link
Member

Choose a reason for hiding this comment

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

We should probably also disable the clear history button here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I thought about it, but I don't think so, since the clear button removes all items, and not just the visible ones. I guess it should rather be disabled, if the overall history is empty and not just the filtered one?

Copy link
Member

@Bnyro Bnyro left a comment

Choose a reason for hiding this comment

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

Ty!

@Bnyro Bnyro merged commit 53a76d2 into libre-tube:master Mar 31, 2025
2 of 3 checks passed
@FineFindus FineFindus deleted the fix/locked-watch-history branch March 31, 2025 15:24
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.

2 participants