diff --git a/app/src/main/kotlin/com/tutpro/baresip/CallsScreen.kt b/app/src/main/kotlin/com/tutpro/baresip/CallsScreen.kt
index 6b5921d9..3a747334 100644
--- a/app/src/main/kotlin/com/tutpro/baresip/CallsScreen.kt
+++ b/app/src/main/kotlin/com/tutpro/baresip/CallsScreen.kt
@@ -293,6 +293,17 @@ private fun Calls(
onLastClicked = lastAction.value,
)
+ val alertTitle = remember { mutableStateOf("") }
+ val alertMessage = remember { mutableStateOf("") }
+ val showAlert = remember { mutableStateOf(false) }
+
+ AlertDialog(
+ showDialog = showAlert,
+ title = alertTitle.value,
+ message = alertMessage.value,
+ lastButtonText = stringResource(R.string.ok),
+ )
+
val lazyListState = rememberLazyListState()
LazyColumn(
modifier = Modifier
@@ -338,10 +349,16 @@ private fun Calls(
}
lastButtonText.value = ctx.getString(R.string.send_message)
lastAction.value = {
- if (ua != null) {
- handleIntent(ctx, viewModel, intent, "message")
- navController.navigateUp()
+ if (account.isMobile) {
+ alertTitle.value = ctx.getString(R.string.notice)
+ alertMessage.value = ctx.getString(R.string.no_sms_messaging)
+ showAlert.value = true
}
+ else
+ if (ua != null) {
+ handleIntent(ctx, viewModel, intent, "message")
+ navController.navigateUp()
+ }
}
showDialog.value = true
},
diff --git a/app/src/main/kotlin/com/tutpro/baresip/ContactsScreen.kt b/app/src/main/kotlin/com/tutpro/baresip/ContactsScreen.kt
index c808e4a9..18f5ee3e 100644
--- a/app/src/main/kotlin/com/tutpro/baresip/ContactsScreen.kt
+++ b/app/src/main/kotlin/com/tutpro/baresip/ContactsScreen.kt
@@ -407,6 +407,17 @@ private fun ContactsContent(
onLastClicked = lastAction.value,
)
+ val alertTitle = remember { mutableStateOf("") }
+ val alertMessage = remember { mutableStateOf("") }
+ val showAlert = remember { mutableStateOf(false) }
+
+ AlertDialog(
+ showDialog = showAlert,
+ title = alertTitle.value,
+ message = alertMessage.value,
+ lastButtonText = stringResource(R.string.ok),
+ )
+
val lazyListState = rememberLazyListState()
LaunchedEffect(searchQuery) {
@@ -518,8 +529,15 @@ private fun ContactsContent(
lastText.value = ctx.getString(R.string.send_message)
lastAction.value = {
if (ua != null) {
- handleIntent(ctx, viewModel, intent, "message")
- navController.navigateUp()
+ if (ua.account.isMobile) {
+ alertTitle.value = ctx.getString(R.string.notice)
+ alertMessage.value = ctx.getString(R.string.no_sms_messaging)
+ showAlert.value = true
+ }
+ else {
+ handleIntent(ctx, viewModel, intent, "message")
+ navController.navigateUp()
+ }
}
}
showDialog.value = true
diff --git a/app/src/main/res/values-fi/strings.xml b/app/src/main/res/values-fi/strings.xml
index 1ee1536c..71502032 100644
--- a/app/src/main/res/values-fi/strings.xml
+++ b/app/src/main/res/values-fi/strings.xml
@@ -294,6 +294,7 @@
%2$s puheluhistoriasta\?
Haluatko poistaa \'%1$s\' %2$s puheluhistoriasta\?
+ SMS-tekstiviestitystä ei ole vielä toteutettu.
Poista käytöstä
Ota käyttöön
Haluatko tyhjentää tilin \'%1$s\' puheluhistorian\?
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index b8201dfb..b82fde90 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -280,6 +280,7 @@
Do you want to add \'%1$s\' to contacts or delete
%2$s from call history\?
Do you want to delete \'%1$s\' %2$s from call history\?
+ Sorry, no SMS messaging yet.
Disable
Enable
Do you want to delete call history of account \'%1$s\'\?