Skip to content

adding times woken up field#572

Merged
vmiklos merged 2 commits into
vmiklos:masterfrom
Rikul:times_woke
Feb 9, 2026
Merged

adding times woken up field#572
vmiklos merged 2 commits into
vmiklos:masterfrom
Rikul:times_woke

Conversation

@Rikul
Copy link
Copy Markdown
Contributor

@Rikul Rikul commented Feb 8, 2026

Added Time woken up field to sleep

Copy link
Copy Markdown
Owner

@vmiklos vmiklos left a comment

Choose a reason for hiding this comment

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

This looks quite promising to me, thanks.

Biggest problem I see is some unexpected red line between sleeps on the main activity like this:

Image

Can you reproduce that?

See also the inline comments, but those are mostly just nits.

Comment thread app/src/main/java/hu/vmiklos/plees_tracker/SleepWakesCallback.kt
Comment thread app/src/main/java/hu/vmiklos/plees_tracker/SleepsAdapter.kt Outdated
Comment thread app/src/main/res/layout/activity_sleep.xml
Comment thread app/src/main/java/hu/vmiklos/plees_tracker/SleepWakesCallback.kt Outdated
@Rikul
Copy link
Copy Markdown
Contributor Author

Rikul commented Feb 9, 2026

There is also a refresh bug with MainActivity. If show_rating and show_awake_for are changed in settings, the main activity will display these correctly after the app is closed and reopened.

Copy link
Copy Markdown
Owner

@vmiklos vmiklos left a comment

Choose a reason for hiding this comment

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

Looks good to me now, thanks! Feel free to try to have some tests & docs for this in a follow-up PR, or sooner or later I'll get to that.

@vmiklos vmiklos merged commit a3672b8 into vmiklos:master Feb 9, 2026
1 check passed
@Rikul Rikul deleted the times_woke branch February 9, 2026 19:45
@vmiklos
Copy link
Copy Markdown
Owner

vmiklos commented Feb 13, 2026

There is also a refresh bug with MainActivity. If show_rating and show_awake_for are changed in settings, the main activity will display these correctly after the app is closed and reopened.

I forgot comment on this. I guess you could handle this somewhat similar to how the show_average_sleep_durations setting is handled here:

preferences.liveDataBoolean("show_average_sleep_durations", false).observe(
this
) {
it?.let {
val fragments = supportFragmentManager
val stats = fragments.findFragmentById(R.id.dashboard_body)?.view
val layout = stats?.findViewById<LinearLayout>(R.id.fragment_stats_average_layout)
if (it) {
layout?.visibility = View.VISIBLE
} else {
layout?.visibility = View.GONE
}
}
}

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