- When new chat message arrives, do not add chat to activity to stack
if it already is there.
This commit is contained in:
@ -49,7 +49,8 @@ class ChatActivity : AppCompatActivity() {
|
||||
ua = userAgent
|
||||
}
|
||||
|
||||
BaresipService.activities.add(0, "chat,$aor,$peerUri,$focus")
|
||||
if (!BaresipService.activities.first().startsWith("chat,$aor,$peerUri"))
|
||||
BaresipService.activities.add(0, "chat,$aor,$peerUri,$focus")
|
||||
|
||||
imm = getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager
|
||||
this@ChatActivity.window.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN)
|
||||
|
||||
@ -822,6 +822,7 @@ class MainActivity : AppCompatActivity() {
|
||||
"message show", "message reply" -> {
|
||||
val peer = params[1]
|
||||
Log.d("Baresip", "Message for $aor from $peer")
|
||||
Log.d("Baresip", "Activity stack ${BaresipService.activities.toString()}")
|
||||
if ((aorSpinner.selectedItemPosition == -1) ||
|
||||
(ua != UserAgent.uas()[aorSpinner.selectedItemPosition]))
|
||||
aorSpinner.setSelection(account_index)
|
||||
|
||||
Reference in New Issue
Block a user