|
|
@ -283,6 +283,7 @@ class MainActivity : AppCompatActivity() { |
|
|
isApplyingRemoteUpdate = true |
|
|
isApplyingRemoteUpdate = true |
|
|
lastLocalText = mergedText |
|
|
lastLocalText = mergedText |
|
|
lastLocalUserEditTime = System.currentTimeMillis() |
|
|
lastLocalUserEditTime = System.currentTimeMillis() |
|
|
|
|
|
currentRevision++ |
|
|
binding.etTranscript.setText(mergedText) |
|
|
binding.etTranscript.setText(mergedText) |
|
|
binding.etTranscript.setTextColor(Color.WHITE) |
|
|
binding.etTranscript.setTextColor(Color.WHITE) |
|
|
binding.etTranscript.setSelection(newCursor) |
|
|
binding.etTranscript.setSelection(newCursor) |
|
|
@ -290,7 +291,13 @@ class MainActivity : AppCompatActivity() { |
|
|
binding.tvCharCount.text = "$wordCount کلمه" |
|
|
binding.tvCharCount.text = "$wordCount کلمه" |
|
|
isApplyingRemoteUpdate = false |
|
|
isApplyingRemoteUpdate = false |
|
|
|
|
|
|
|
|
AppLogger.log("Main", "تزریق گفتار در نشانگر: '$trimmedSpeech' (موقعیت جدید: $newCursor)") |
|
|
|
|
|
|
|
|
// Guarantees immediate 1:1 synchronization with Mac input box |
|
|
|
|
|
streamDictationClient?.sendPhoneEdit(mergedText, newCursor) |
|
|
|
|
|
lifecycleScope.launch { |
|
|
|
|
|
sendDirectPaste(mergedText, newCursor) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
AppLogger.log("Main", "تزریق گفتار در نشانگر و همگامسازی با مک: '$trimmedSpeech' (موقعیت جدید: $newCursor)") |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private fun setupUI() { |
|
|
private fun setupUI() { |
|
|
|