Skip to content

Commit 8598bea

Browse files
committed
Apply suggestion
1 parent c05dfb3 commit 8598bea

File tree

14 files changed

+23
-5
lines changed

14 files changed

+23
-5
lines changed

app/src/debug/kotlin/io/homeassistant/companion/android/developer/catalog/HATextAndBannersScreen.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ private fun LazyListScope.textStyles() {
4444
style = HATextStyle.Headline,
4545
modifier = Modifier.fillMaxWidth(),
4646
)
47+
Text(
48+
text = "HeadlineMedium",
49+
style = HATextStyle.HeadlineMedium,
50+
modifier = Modifier.fillMaxWidth(),
51+
)
4752
Text(
4853
text = "Body",
4954
style = HATextStyle.Body,

app/src/main/kotlin/io/homeassistant/companion/android/onboarding/serverdiscovery/ServerDiscoveryScreen.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ private fun OneServerFound(
185185
) {
186186
Text(
187187
text = serverDiscovered.name,
188-
style = HATextStyle.Headline,
188+
style = HATextStyle.HeadlineMedium,
189189
)
190190
Icon(
191191
imageVector = Icons.Default.Storage,

app/src/main/kotlin/io/homeassistant/companion/android/webview/WebViewContentScreen.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ internal fun WebViewContentScreen(
8888
nightModeTheme: NightModeTheme? = null,
8989
statusBarColor: Color? = null,
9090
backgroundColor: Color? = null,
91-
hasNotificationPermission: Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU,
91+
supportsNotificationPermission: Boolean = Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU,
9292
) {
9393
HATheme {
9494
Scaffold(
@@ -133,7 +133,7 @@ internal fun WebViewContentScreen(
133133
}
134134
}
135135
}
136-
if (webViewInitialized && shouldAskNotificationPermission && hasNotificationPermission) {
136+
if (webViewInitialized && shouldAskNotificationPermission && supportsNotificationPermission) {
137137
@SuppressLint("InlinedApi")
138138
NotificationPermission(onDiscardNotificationPermission)
139139
}
@@ -242,7 +242,7 @@ private fun NotificationPermission(onDiscardNotificationPermission: () -> Unit)
242242
) {
243243
Text(
244244
text = stringResource(commonR.string.notification_permission_dialog_title),
245-
style = HATextStyle.Headline,
245+
style = HATextStyle.HeadlineMedium,
246246
)
247247
Text(
248248
text = stringResource(commonR.string.notification_permission_dialog_content),

app/src/screenshotTest/kotlin/io/homeassistant/companion/android/webview/WebViewContentScreenScreenshotTest.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ class WebViewContentScreenScreenshotTest {
8787
customViewFromWebView = null,
8888
onFullscreenClicked = {},
8989
onDiscardNotificationPermission = {},
90-
hasNotificationPermission = true,
90+
supportsNotificationPermission = true,
9191
)
9292
}
9393
}
Loading
Loading

0 commit comments

Comments
 (0)