Skip to content

Add "Ends at" time display. - #475

Merged
damontecres merged 8 commits into
damontecres:mainfrom
asandhu3:add-end-time
Dec 18, 2025
Merged

damontecres merged 8 commits into
damontecres:mainfrom
asandhu3:add-end-time

Conversation

@asandhu3

Copy link
Copy Markdown
Contributor

Addresses #441 .

@Pentaphon

Copy link
Copy Markdown

Is this going to be placed inside the play button?

@damontecres damontecres left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thanks for the contribution!

I'm putting this to request changes because I want to think about how best to manage/track the current time throughout the app's interface. This implementation sets the end time, but won't update after the initial display. But having multiple places tracking the current time needs some thought to be before fixing this.

I'll definitely come back to this soon.

@damontecres

Copy link
Copy Markdown
Owner

#493 will unblock this, there's an example of how to use it in that PR

When you update this PR, can you provide some screenshots?

Thanks!

damontecres added a commit that referenced this pull request Dec 17, 2025
## Description
Creates a `CompositionLocal` which tracks the current time in a single
place and is usable anywhere in the app.

Can be used such as:
```kotlin
val now = LocalClock.current.now
val details = remember(item, now) {
  // Create detail strings based the item and current time
  // This will be recomposed/updated whenever the time changes
}
```

### Related issues
Related to #475
@asandhu3

Copy link
Copy Markdown
Contributor Author

@damontecres
Screenshot 2025-12-17 at 2 20 19 PM
Screenshot 2025-12-17 at 2 20 37 PM
Screenshot 2025-12-17 at 2 21 18 PM

@damontecres

damontecres commented Dec 18, 2025 •

Copy link
Copy Markdown
Owner

I consolidated the code for movies & episodes into a a single function.

I also moved the string to be after the time remaining time. And changed the calculation to use the time remaining or the whole duration if the item's time remaining is zero.

Finally, removed the end time from the series header since that duration is an estimate of the average runtime for episodes, not a specific playable runtime.

image

Thanks again for the contribution!

@damontecres
damontecres merged commit fd260f2 into damontecres:main Dec 18, 2025
2 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.

3 participants