Skip to content

Commit 85b324b

Browse files
committed
feat: Change feedback button to issue reporter
1 parent 4349540 commit 85b324b

1 file changed

Lines changed: 26 additions & 6 deletions

File tree

  • ui/src/main/java/com/github/umercodez/sensorspot/ui/screens/about

ui/src/main/java/com/github/umercodez/sensorspot/ui/screens/about/AboutScreen.kt

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ import androidx.compose.foundation.verticalScroll
3232
import androidx.compose.material.icons.Icons
3333
import androidx.compose.material.icons.filled.Email
3434
import androidx.compose.material.icons.filled.Info
35+
import androidx.compose.material3.ButtonColors
36+
import androidx.compose.material3.ButtonDefaults
3537
import androidx.compose.material3.ExperimentalMaterial3Api
3638
import androidx.compose.material3.HorizontalDivider
3739
import androidx.compose.material3.Icon
@@ -50,6 +52,9 @@ import androidx.compose.ui.Alignment
5052
import androidx.compose.ui.Modifier
5153
import androidx.compose.ui.platform.LocalContext
5254
import androidx.compose.ui.platform.LocalInspectionMode
55+
import androidx.compose.ui.text.SpanStyle
56+
import androidx.compose.ui.text.buildAnnotatedString
57+
import androidx.compose.ui.text.withStyle
5358
import androidx.compose.ui.text.style.TextAlign
5459
import androidx.compose.ui.tooling.preview.Preview
5560
import androidx.compose.ui.unit.dp
@@ -129,20 +134,35 @@ fun AboutScreen() {
129134

130135
Spacer(Modifier.height(10.dp))
131136

132-
var showFeedBackForm by remember { mutableStateOf(false) }
137+
var showIssueReporter by remember { mutableStateOf(false) }
133138
val webViewState = rememberWebViewState("https://docs.google.com/forms/d/e/1FAIpQLSf6iGpaUrPYAR5fhkLSkHdqWUdruGzc2kQOluQnb_NbTcQ8tg/viewform?usp=header")
134139

135140
TextButton(
136141
onClick = {
137-
showFeedBackForm = true
138-
}
142+
showIssueReporter = true
143+
},
144+
colors = ButtonDefaults.textButtonColors(
145+
contentColor = MaterialTheme.colorScheme.error
146+
)
139147
) {
140-
Text("Send Feedback")
148+
Text(
149+
textAlign = TextAlign.Center,
150+
text = buildAnnotatedString {
151+
withStyle(style = SpanStyle()){
152+
append("Report Issue")
153+
}
154+
withStyle(style = SpanStyle()){
155+
append("\n")
156+
}
157+
withStyle(style = SpanStyle(fontSize = MaterialTheme.typography.labelSmall.fontSize)){
158+
append("(Non Github users)")
159+
}
160+
})
141161
}
142162

143-
if(showFeedBackForm){
163+
if(showIssueReporter){
144164
ModalBottomSheet(
145-
onDismissRequest = { showFeedBackForm = false }
165+
onDismissRequest = { showIssueReporter = false }
146166
) {
147167

148168
Column{

0 commit comments

Comments
 (0)