Skip to content

Commit

Permalink
移除新的寫法
Browse files Browse the repository at this point in the history
  • Loading branch information
qwe7002 committed Nov 30, 2024
1 parent da5870c commit 8cea215
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions app/src/main/java/com/qwe7002/telegram_rc/SMSReceiver.kt
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,9 @@ class SMSReceiver : BroadcastReceiver() {
if (messages[0]!!.messageClass == SmsMessage.MessageClass.CLASS_0) {
flashSmsString = "\nType: Class 0"
}
val messageHead = """
[$dualSim${context.getString(R.string.receive_sms_head)}]$flashSmsString
${context.getString(R.string.from)}$messageAddress
${context.getString(R.string.content)}
""".trimIndent()
val messageHead = "[" + dualSim + context.getString(R.string.receive_sms_head) + "]\n" +
context.getString(R.string.from) + messageAddress + "\n" +
context.getString(R.string.content)
var rawRequestBodyText: String = messageHead + messageBody
var isVerificationCode = false
if (preferences.read("verification_code", false)!! && !isTrustedPhone) {
Expand Down Expand Up @@ -147,21 +145,23 @@ class SMSReceiver : BroadcastReceiver() {
preferences.read("chat_command", false)!!
)
}.start()
rawRequestBodyText = """
${context.getString(R.string.system_message_head)}
${context.getString(R.string.restart_service)}
""".trimIndent()
rawRequestBodyText =
context.getString(R.string.system_message_head) + "\n" +
context.getString(R.string.restart_service)
requestBody.text = rawRequestBodyText
}

"/switchdata" -> {
if (!dataEnable) {
openData(context)
}
rawRequestBodyText = """
/* rawRequestBodyText = """
${context.getString(R.string.system_message_head)}
${context.getString(R.string.switch_data)}
""".trimIndent()
""".trimIndent()*/
rawRequestBodyText =
context.getString(R.string.system_message_head) + "\n" +
context.getString(R.string.switch_data)
requestBody.text = rawRequestBodyText
}

Expand Down

0 comments on commit 8cea215

Please sign in to comment.