mirror of
https://github.com/nextcloud/talk-android
synced 2025-07-26 22:25:38 +01:00
copy the message
Signed-off-by: sowjanyakch <sowjanya.kch@gmail.com>
This commit is contained in:
parent
7d381f4ca5
commit
a7997abf57
app/src/main
@ -10,6 +10,8 @@ package com.nextcloud.talk.diagnose
|
||||
import android.content.ClipData
|
||||
import android.content.ClipboardManager
|
||||
import android.content.Context
|
||||
import android.os.Build
|
||||
import android.widget.Toast
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
@ -71,7 +73,6 @@ fun DiagnoseContentComposable(
|
||||
onClick = {
|
||||
diagnoseViewModel.fetchTestPushResult()
|
||||
}
|
||||
|
||||
) {
|
||||
Text(
|
||||
text = element.headline,
|
||||
@ -121,15 +122,6 @@ fun DiagnoseContentComposable(
|
||||
CircularProgressIndicator()
|
||||
}
|
||||
}
|
||||
|
||||
if (showDialog.value) {
|
||||
Dialog(
|
||||
onDismissRequest = { diagnoseViewModel.dismissDialog() },
|
||||
properties = DialogProperties(
|
||||
dismissOnClickOutside = true,
|
||||
usePlatformDefaultWidth = false
|
||||
)
|
||||
) {
|
||||
if (showDialog.value) {
|
||||
Dialog(
|
||||
onDismissRequest = { diagnoseViewModel.dismissDialog() },
|
||||
@ -177,6 +169,9 @@ fun DiagnoseContentComposable(
|
||||
context.getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
|
||||
val clip = ClipData.newPlainText("Push Message", message.value)
|
||||
clipboard.setPrimaryClip(clip)
|
||||
if (Build.VERSION.SDK_INT <= Build.VERSION_CODES.S_V2) {
|
||||
Toast.makeText(context, R.string.message_copied, Toast.LENGTH_SHORT).show()
|
||||
}
|
||||
diagnoseViewModel.dismissDialog()
|
||||
}) {
|
||||
Text(text = stringResource(R.string.nc_common_copy))
|
||||
@ -188,5 +183,3 @@ fun DiagnoseContentComposable(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -230,6 +230,7 @@ How to translate with transifex:
|
||||
<string name="nc_diagnose_flavor" translatable="false">Build flavor</string>
|
||||
<string name="nc_test_push_button">"Test push notifications</string>
|
||||
<string name="nc_test_results">Test results</string>
|
||||
<string name="message_copied">Message copied</string>
|
||||
|
||||
<!-- Conversation menu -->
|
||||
<string name="nc_leave">Leave conversation</string>
|
||||
|
Loading…
Reference in New Issue
Block a user