Skip to content

Move time tracking into a CompositionLocal - #493

Merged
damontecres merged 1 commit into
mainfrom
dev/track-time
Dec 17, 2025
Merged

damontecres merged 1 commit into
mainfrom
dev/track-time

Conversation

@damontecres

Copy link
Copy Markdown
Owner

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:

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

@damontecres damontecres added the dev Related to development of the project label Dec 17, 2025
@damontecres
damontecres merged commit 7581b05 into main Dec 17, 2025
2 checks passed
@damontecres
damontecres deleted the dev/track-time branch December 17, 2025 18:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev Related to development of the project

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant