Skip to content

Commit

Permalink
change wear complication text formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Razeeman committed Mar 16, 2024
1 parent 12318e6 commit dd87cb0
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 2 deletions.
Binary file modified dev_files/publish/wear_play_complication.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev_files/screens/wear2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified dev_files/screens/wear2_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion resources/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ If <b>\"%s\"</b> setting is enabled, app will send events on activity started or
<string name="settings_save_description">Before saving, make sure that you have the latest version of the app installed to avoid conflicts.</string>
<string name="settings_automatic_backup">Enable automatic backup</string>
<string name="settings_automatic_export">Enable automatic spreadsheet export</string>
<string name="settings_automatic_description">File will be saved in the selected location overriding previously saved file every day at midnight.</string>
<string name="settings_automatic_description">File will be saved in the selected location overwriting previously saved file every day at midnight.</string>
<string name="settings_automatic_last_save">Last save:</string>
<string name="settings_restore_backup">Restore backup</string>
<string name="settings_restore_description">Current data will be lost.</string>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,10 @@ class WearComplicationService : SuspendingComplicationDataSourceService() {
onClick: PendingIntent?,
): ComplicationData {
val text = if (startedAt != null) {
// SHORT_DUAL_UNIT seems better,
// but on samsung watch for example "1h 15m" is shown as just "2h"
TimeDifferenceComplicationText.Builder(
TimeDifferenceStyle.SHORT_DUAL_UNIT,
TimeDifferenceStyle.STOPWATCH,
CountUpTimeReference(Instant.ofEpochMilli(startedAt)),
).build()
} else {
Expand Down

0 comments on commit dd87cb0

Please sign in to comment.