Skip to content

Commit f441aaa

Browse files
committed
SleepTimer: update tile freshness
1 parent 4944982 commit f441aaa

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

wear/src/main/java/com/thewizrd/simplesleeptimer/wearable/WearableDataListenerService.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,8 @@ class WearableDataListenerService : WearableListenerService() {
229229
if (mPhoneNodeWithApp == null) {
230230
// Disconnect or dismiss any ongoing activity
231231
dismissTimerOngoingActivity()
232+
} else if (SleepTimerTileService.isInFocus) {
233+
SleepTimerTileService.requestTileUpdate(this)
232234
}
233235
}
234236

wear/src/main/java/com/thewizrd/simplesleeptimer/wearable/tiles/SleepTimerTileRenderer.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -117,14 +117,6 @@ class SleepTimerTileRenderer(context: Context, debugResourceMode: Boolean = fals
117117
override fun getResourcesVersionForTileState(state: TimerState): String {
118118
return "isLocalTimer=${state.isLocalTimer}"
119119
}
120-
121-
override fun getFreshnessIntervalMillis(state: TimerState): Long {
122-
return if (state.isLocalTimer) {
123-
60000
124-
} else {
125-
super.getFreshnessIntervalMillis(state)
126-
}
127-
}
128120
}
129121

130122
internal enum class TimerTileDuration {

0 commit comments

Comments
 (0)