Skip to content

Fix crash on random button click with empty list#1596

Merged
FooIbar merged 1 commit intomainfrom
fb/random
Sep 5, 2024
Merged

Fix crash on random button click with empty list#1596
FooIbar merged 1 commit intomainfrom
fb/random

Conversation

@FooIbar
Copy link
Copy Markdown
Owner

@FooIbar FooIbar commented Sep 5, 2024

No description provided.

@FooIbar FooIbar enabled auto-merge (rebase) September 5, 2024 12:47
@FooIbar FooIbar merged commit 9c9b8b7 into main Sep 5, 2024
@FooIbar FooIbar deleted the fb/random branch September 5, 2024 12:53
if (!selectMode) {
onClick(Icons.Default.Shuffle) {
withUIContext { navToReader(list.random().galleryInfo) }
if (list.isNotEmpty()) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Maybe we just should not show that button if list is empty? now that we have efficient dsl.

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

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

Well, other buttons (sort, filter) are effectively no-op as well when the list is empty.

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