Add feedback link

pull/395/head
Don Turner 2 years ago
parent 0171971dc7
commit 8a816e2149

@ -82,7 +82,7 @@ class SettingsDialogTest {
}
@Test
fun whenStateIsSuccess_allLegalLinksAreDisplayed() {
fun whenStateIsSuccess_allLinksAreDisplayed() {
composeTestRule.setContent {
SettingsDialog(
settingsUiState = Success(
@ -100,5 +100,6 @@ class SettingsDialogTest {
composeTestRule.onNodeWithText(getString(R.string.privacy_policy)).assertExists()
composeTestRule.onNodeWithText(getString(R.string.licenses)).assertExists()
composeTestRule.onNodeWithText(getString(R.string.brand_guidelines)).assertExists()
composeTestRule.onNodeWithText(getString(R.string.feedback)).assertExists()
}
}

@ -110,7 +110,7 @@ fun SettingsDialog(
}
}
Divider(Modifier.padding(top = 8.dp))
LegalPanel()
LinksPanel()
}
},
confirmButton = {
@ -201,7 +201,7 @@ fun SettingsDialogThemeChooserRow(
}
@Composable
private fun LegalPanel() {
private fun LinksPanel() {
Row(
modifier = Modifier.padding(top = 16.dp)
) {
@ -226,6 +226,11 @@ private fun LegalPanel() {
text = stringResource(string.brand_guidelines),
url = BRAND_GUIDELINES_URL
)
Spacer(Modifier.width(16.dp))
TextLink(
text = stringResource(string.feedback),
url = FEEDBACK_URL
)
}
}
}
@ -283,3 +288,4 @@ fun PreviewSettingsDialogLoading() {
private const val PRIVACY_POLICY_URL = "https://policies.google.com/privacy"
private const val LICENSES_URL = "https://github.com/android/nowinandroid/blob/main/app/LICENSES.md#open-source-licenses-and-copyright-notices"
private const val BRAND_GUIDELINES_URL = "https://developer.android.com/distribute/marketing-tools/brand-guidelines"
private const val FEEDBACK_URL = "https://goo.gle/nia-app-feedback"

@ -21,6 +21,7 @@
<string name="privacy_policy">Privacy policy</string>
<string name="licenses">Licenses</string>
<string name="brand_guidelines">Brand Guidelines</string>
<string name="feedback">Feedback</string>
<string name="theme">Theme</string>
<string name="brand_default">Default</string>
<string name="brand_android">Android</string>

Loading…
Cancel
Save