added account title to chat(s) and calls pages
This commit is contained in:
@@ -10,6 +10,7 @@ import android.util.Log
|
||||
import android.view.MenuItem
|
||||
import android.widget.AdapterView
|
||||
import android.widget.ListView
|
||||
import android.widget.TextView
|
||||
import java.io.File
|
||||
import java.io.FileInputStream
|
||||
import java.io.FileOutputStream
|
||||
@@ -28,15 +29,18 @@ class CallsActivity : AppCompatActivity() {
|
||||
|
||||
public override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
setContentView(R.layout.activity_calls)
|
||||
|
||||
val listView = findViewById(R.id.calls) as ListView
|
||||
setContentView(R.layout.activity_calls)
|
||||
|
||||
val aor = intent.extras.getString("aor")
|
||||
val ua = Account.findUa(aor)!!
|
||||
|
||||
aorGenerateHistory(aor)
|
||||
val headerView = findViewById(R.id.account) as TextView
|
||||
val headerText = "Account ${aor.substringAfter(":")}"
|
||||
headerView.text = headerText
|
||||
|
||||
val listView = findViewById(R.id.calls) as ListView
|
||||
aorGenerateHistory(aor)
|
||||
val adapter = CallListAdapter(this, uaHistory)
|
||||
listView.adapter = adapter
|
||||
listView.isLongClickable = true
|
||||
|
||||
@@ -57,9 +57,12 @@ class ChatActivity : AppCompatActivity() {
|
||||
}
|
||||
setTitle("Chat with $chatPeer")
|
||||
|
||||
chatMessages = uaPeerMessages(aor, peerUri)
|
||||
val headerView = findViewById(R.id.account) as TextView
|
||||
val headerText = "Account ${aor.substringAfter(":")}"
|
||||
headerView.text = headerText
|
||||
|
||||
val listView = findViewById(R.id.messages) as ListView
|
||||
chatMessages = uaPeerMessages(aor, peerUri)
|
||||
mlAdapter = MessageListAdapter(this, chatMessages)
|
||||
listView.adapter = mlAdapter
|
||||
listView.isLongClickable = true
|
||||
|
||||
@@ -34,8 +34,12 @@ class ChatsActivity: AppCompatActivity() {
|
||||
plusButton = findViewById(R.id.plusButton) as ImageButton
|
||||
|
||||
aor = intent.extras.getString("aor")
|
||||
uaMessages = uaMessages(aor)
|
||||
|
||||
val headerView = findViewById(R.id.account) as TextView
|
||||
val headerText = "Account ${aor.substringAfter(":")}"
|
||||
headerView.text = headerText
|
||||
|
||||
uaMessages = uaMessages(aor)
|
||||
clAdapter = ChatListAdapter(this, uaMessages)
|
||||
listView.adapter = clAdapter
|
||||
listView.isLongClickable = true
|
||||
|
||||
Reference in New Issue
Block a user