Skip to content

Add quick-select chips to sleep timer#8049

Merged
FineFindus merged 6 commits intolibre-tube:masterfrom
PavelStefanov:feat/sleep-timer-chips
Jan 10, 2026
Merged

Add quick-select chips to sleep timer#8049
FineFindus merged 6 commits intolibre-tube:masterfrom
PavelStefanov:feat/sleep-timer-chips

Conversation

@PavelStefanov
Copy link
Copy Markdown
Contributor

Added preset duration chips (10, 20, 30, 45, 60 minutes) to the sleep timer bottom sheet.

As a user, I want to quickly pick a duration without typing it in manually every time. Now you can just tap a chip to instantly set a common duration, making the sleep timer much faster to use for typical scenarios while still keeping manual input available for custom durations.

image

Copy link
Copy Markdown
Collaborator

@FineFindus FineFindus left a comment

Choose a reason for hiding this comment

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

Thanks for the PR. Instead of defining each chip manually in the layout file, please create them programmatically, to avoid duplication and drift between the actual duration value and the displayed values.

See

channelGroupsModel.groups.value?.forEachIndexed { index, group ->
or
binding.speedShortcuts.adapter = SliderLabelsAdapter(SUGGESTED_SPEEDS) {

For consistency reasons, the chips should also be displayed above the text field, similar to how the quick selection for speed values is displayed above the slider.

@PavelStefanov
Copy link
Copy Markdown
Contributor Author

@FineFindus thanks for taking the time to review!
Fixed both comments - chips are now created programmatically and displayed above the text field like the speed selector.

@FineFindus FineFindus force-pushed the feat/sleep-timer-chips branch from 90f6d9b to f21b751 Compare January 10, 2026 12:35
Copy link
Copy Markdown
Collaborator

@FineFindus FineFindus left a comment

Choose a reason for hiding this comment

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

Thanks! I changed it so the timer is started immediately when the user selects a chip and avoid the clipping of the chip bar to the container margin.

@FineFindus FineFindus merged commit 1cdb3e0 into libre-tube:master Jan 10, 2026
4 checks passed
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