A fork of Simple Time Tracker with WearOS support. (Now integrated upstream)
0

Configure Feed

Select the types of activity you want to include in your feed.

refactor(RefreshButton): Add default `contentDescription`

Means calling Composables only need to provide a click handler.

Joseph Hale (Feb 26, 2024, 10:27 PM -0700) 03ee922a 08c4bea6

+2 -8
+1 -6
wear/src/main/java/com/example/util/simpletimetracker/presentation/components/ActivitiesList.kt
··· 35 35 ) 36 36 } 37 37 } 38 - item { 39 - RefreshButton( 40 - onClick = onRefresh, 41 - contentDescription = "Refresh Activities List", 42 - ) 43 - } 38 + item { RefreshButton(onClick = onRefresh) } 44 39 } 45 40 } 46 41
+1 -2
wear/src/main/java/com/example/util/simpletimetracker/presentation/components/RefreshButton.kt
··· 18 18 import androidx.wear.compose.material.OutlinedButton 19 19 20 20 @Composable 21 - fun RefreshButton(onClick: () -> Unit, contentDescription: String) { 21 + fun RefreshButton(onClick: () -> Unit, contentDescription: String = "Refresh") { 22 22 val context = LocalContext.current 23 23 24 24 OutlinedButton( ··· 39 39 private fun Preview() { 40 40 RefreshButton( 41 41 onClick = { /* Log.i("Preview", "Refresh Button clicked!") */ }, 42 - contentDescription = "Refreshing...", 43 42 ) 44 43 }