feat: Remove FCM token display and copy functionality from ChatsListScreen
This commit is contained in:
@@ -1148,58 +1148,6 @@ fun ChatsListScreen(
|
||||
}
|
||||
)
|
||||
|
||||
// 🔔 FCM Token
|
||||
DrawerDivider(isDarkTheme)
|
||||
run {
|
||||
var fcmToken by remember { mutableStateOf<String?>(null) }
|
||||
LaunchedEffect(Unit) {
|
||||
fcmToken = context.getSharedPreferences("rosetta_prefs", Context.MODE_PRIVATE)
|
||||
.getString("fcm_token", null)
|
||||
}
|
||||
val clipboardManager = androidx.compose.ui.platform.LocalClipboardManager.current
|
||||
val tokenValue = fcmToken
|
||||
if (!tokenValue.isNullOrEmpty()) {
|
||||
Column(
|
||||
modifier = Modifier
|
||||
.fillMaxWidth()
|
||||
.clickable {
|
||||
clipboardManager.setText(
|
||||
androidx.compose.ui.text.AnnotatedString(tokenValue)
|
||||
)
|
||||
android.widget.Toast.makeText(
|
||||
context,
|
||||
"FCM token copied",
|
||||
android.widget.Toast.LENGTH_SHORT
|
||||
).show()
|
||||
}
|
||||
.padding(horizontal = 20.dp, vertical = 10.dp)
|
||||
) {
|
||||
Text(
|
||||
text = "FCM Token (tap to copy)",
|
||||
fontSize = 11.sp,
|
||||
fontWeight = FontWeight.Medium,
|
||||
color = if (isDarkTheme) Color(0xFF8E8E93) else Color(0xFF8E8E93)
|
||||
)
|
||||
Spacer(modifier = Modifier.height(4.dp))
|
||||
Text(
|
||||
text = tokenValue,
|
||||
fontSize = 9.sp,
|
||||
color = if (isDarkTheme) Color(0xFF555555) else Color(0xFFAAAAAA),
|
||||
maxLines = 3,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
fontFamily = FontFamily.Monospace
|
||||
)
|
||||
}
|
||||
} else {
|
||||
Text(
|
||||
text = "FCM Token: not available",
|
||||
fontSize = 11.sp,
|
||||
color = if (isDarkTheme) Color(0xFF555555) else Color(0xFFAAAAAA),
|
||||
modifier = Modifier.padding(horizontal = 20.dp, vertical = 10.dp)
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════
|
||||
|
||||
Reference in New Issue
Block a user