551 Commits

Author SHA1 Message Date
b36e8e8197 plees-tracker 25.8 2025-08-03 22:01:03 +02:00
a1752d3f43 Update dependencies (2025-07) 2025-07-11 23:01:55 +02:00
66e8ef43fa bedtime and wakeup reminders: move UI to the preferences activity
And add a SwitchPreference to enable or disable this, which means it's
possible to disable this -- this was missing previously.
2025-06-14 12:43:19 +02:00
53d64216a5 bedtime/wakeup: show the value of these in the preferences activity
Towards eliminating the inconsistency that these reminders can be set
via a menu item, while everything else is in the preferences activity.

This just shows the preferences so far, no modification is possible yet.
2025-05-09 23:03:25 +02:00
0310a559a4 Update dependencies (2025-05) 2025-05-03 13:03:14 +02:00
4b0c87fb57 bedtime/wakeup: merge into just 2 settings
Mostly because this way the strings can be exposed in the preferences
activity later.

Note that there is no explicit

```
editor.remove("bedtime_hour")
editor.remove("bedtime_minute")
editor.remove("wakeup_hour")
editor.remove("wakeup_minute")
```

because these settings were never in a released version.
2025-05-02 23:29:17 +02:00
a69f90ec85 Update dependencies (2025-04) 2025-04-04 23:45:34 +02:00
e8b1082a16 Fix one last l10n string, address ktlint issues 2025-03-15 08:15:38 +01:00
b1f58c0b1f fix: xml resource strings 2025-03-15 08:15:38 +01:00
d7e2f6ffe4 feat: bedtime and wakeup reminders 2025-03-15 08:15:38 +01:00
771bb3fcb7 Update dependencies (2025-03) 2025-03-02 20:34:09 +01:00
58d4e7ffa9 plees-tracker 25.2.1 2025-03-02 19:13:48 +01:00
df886beba2 Export to file: include ISO date in default file name
With the old plees-tracker.csv, the next export created 'plees-tracker
(1).csv' and so on; try to avoid annoying spaces in filenames by adding
the date to the name, so if you sleep once a day (typical), then you
don't hit this.

Fixes <https://github.com/vmiklos/plees-tracker/issues/527>.
2025-02-07 21:52:58 +01:00
ce48ef1a6b Update dependencies (2025-02) 2025-02-02 12:32:35 +01:00
04dd25dd70 plees-tracker 25.2 2025-02-01 18:10:02 +01:00
38107d3a4a Use SDK 35 & avoid edge-to-edge enforcement
Otherwise our layout looks quite strange, similar to
<https://stackoverflow.com/questions/79210294/unable-to-fix-layout-issue-in-android-sdk-35>.
2025-01-03 22:46:43 +01:00
30e9b6587b plees-tracker 24.8.2 2025-01-01 13:12:42 +01:00
f69171e513 Avoid targeting SDK 35 for now
Otherwise our layout looks quite strange, similar to
<https://stackoverflow.com/questions/79210294/unable-to-fix-layout-issue-in-android-sdk-35>.
2024-12-31 22:22:02 +01:00
41d3c1d9a1 Export to file: add a pretty CSV mode
End-users sometimes want to show their sleep log to other people, but
the data exported to a file, but that is not human-readable.

The default export format is a CSV that is meant to be easy to import
back, i.e. a machine-readable file format.

Fix the problem by adding a setting (defaults to false): if enabled, the
export result will have formatted timestamps and also the sleep length
will be written there, if if that's redundant for a machine reader.

Fixes <https://github.com/vmiklos/plees-tracker/issues/515>.
2024-12-31 14:44:55 +01:00
1af235834d Update dependencies (2024-12) 2024-12-01 20:27:44 +01:00
e8e9c2753b dark mode: slightly adjust Daily color 2024-11-15 21:55:02 +01:00
cccf70cdda plees-tracker 24.8.1 2024-11-10 15:01:55 +01:00
ab06994b4d dark mode: reduce contrast of colors
- change background from #000 to #1f1f1f
- change text color from #ffffff to #e0e0e0
- dashboard: customize Sleeps and Daily colors

Fixes <https://github.com/vmiklos/plees-tracker/issues/506>.
2024-11-08 21:29:41 +01:00
b41089d941 Update dependencies (2024-11) 2024-11-03 11:54:59 +01:00
eade6266c2 UITestBase: pkg can be private
Leftover from the extract of this class from MainActivityUITest, where
everything was protected by default as a start.
2024-11-03 11:19:23 +01:00
e98730a52c test: clean up getResText() with its hint argument
Best to always do the "wait for text + assert" in one go, and it's less
code this way.
2024-11-02 15:49:40 +01:00
0de3c86641 test: avoid going via the UI in createSleep()
This is used only during setup, not part of the actual "when" action of
the UI tests. Also means that testUpdate() can now set the start of the
sleep only once, since the original start/stop value can be controlled.
2024-10-31 22:38:38 +01:00
14e1ec6aca test: split create and read tests 2024-10-31 18:50:19 +01:00
b67740db85 test: simplify resetDatabase()
Turns out no need to go via the UI in this case.

Also prevent test fail when test run is not between 10am and 10pm.
2024-10-31 09:28:39 +01:00
051ffdb3f4 Extract SleepActivityUITest from MainActivityUITest
Also add a UITestBase base class to avoid duplication.
2024-10-29 22:25:28 +01:00
fc1cdd7e2f uitest: add update test
And remove the last, unreliable espresso test.
2024-10-29 12:11:51 +01:00
3c7dcc2cb0 uitest: improve test failure message
Also add assert helpers, so actual test code doesn't have to worry about
timeouts, similar to how Cypress does it for web apps.
2024-10-28 08:10:03 +01:00
447ede9a1e ui test: add delete testcase
And remove an unreliable instrumented test which was disabled already.
2024-10-27 08:14:15 +01:00
329bce2b20 test: clarify on the starting state
Best to explicitly delete old sleeps than just hoping we won't have any.
2024-10-26 08:39:54 +02:00
5cf023baf7 test: resolve FIXME in sleep create test
Try the uiautomator approach, espresso doesn't seem to be able to cope
with the coroutines/room/observer-based UI updates.
2024-10-26 00:00:57 +02:00
6b7b87b55c Update dependencies (2024-10) 2024-10-03 19:46:15 +02:00
465424c96c Update dependencies (2024-09) 2024-09-07 22:35:18 +02:00
443efca1b9 plees-tracker 24.8.0 2024-08-01 20:29:39 +02:00
4052040dee Fix the default for compact_view
The intention was to have this default to true, preferences.xml had that
default, but not the data model code, fix this.
2024-07-07 22:06:18 +02:00
e9791d803a Update dependencies (2024-07) 2024-07-07 21:56:12 +02:00
28336c9774 plees-tracker 24.2.5 2024-07-02 13:11:32 +02:00
e65f40a821 Don't require app restart when changing the use_median setting
Have the getAfterLive() and the liveDataBoolean("use_median", ...) calls
in separate scopes, so in case we want to add more settings there in the
future, then no need to increase nesting again this way.

And in case afterSleep is not a callable, then it would be only called
once, so the chained LiveData wouldn't update properly.

Fixes <https://github.com/vmiklos/plees-tracker/issues/474>.
2024-06-02 15:25:53 +02:00
9f4fc28cfd plees-tracker 24.2.4 2024-06-01 19:50:02 +02:00
a866ffd33e Add option to use median instead of average
Median code is a separate file to have the correct header, from
<https://github.com/TheAlgorithms/Kotlin/blob/master/src/main/kotlin/math/Median.kt>.

Fixes <https://github.com/vmiklos/plees-tracker/issues/437>.
2024-05-24 21:53:45 +02:00
afa662fd2b Update androidx.fragment:fragment-ktx to 1.7.1 2024-05-24 19:26:41 +02:00
64764cf2e4 Update AGP to 8.4, Gradle to 8.6 2024-05-11 14:20:49 +02:00
5c31fd0e21 Update dependencies (2024-05) 2024-05-10 20:31:10 +02:00
c557559a90 plees-tracker 24.2.3 2024-05-03 20:30:58 +02:00
35084ee338 Show zero time instead of empty text without sleeps
Return the usual formatted string instead of an empty one.

Fixes <https://github.com/vmiklos/plees-tracker/issues/436>.
2024-04-21 17:41:22 +02:00
305890cd1e plees-tracker 24.2.2 2024-04-01 15:10:55 +02:00