- Resume baresip application to the activity that was stopped.

- Add example contact when baresip is started the first time.
- Fixed showing of new message in the chats and messages list.
This commit is contained in:
Juha Heinanen
2019-03-16 08:32:16 +02:00
parent 75b8067e83
commit 613e92e868
9 changed files with 49 additions and 44 deletions
@@ -27,7 +27,11 @@ class ChatsActivity: AppCompatActivity() {
internal lateinit var plusButton: ImageButton
public override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
Log.d("Baresip", "Chats created")
setContentView(R.layout.activity_chats)
filesPath = applicationContext.filesDir.absolutePath
@@ -149,6 +153,20 @@ class ChatsActivity: AppCompatActivity() {
super.onPause()
}
/*override fun onStop() {
super.onStop()
Log.d("Baresip", "Chats stopped")
}*/
override fun onResume() {
super.onResume()
// Log.d("Baresip", "Chats resumed")
clAdapter.clear()
uaMessages = uaMessages(aor)
clAdapter = ChatListAdapter(this, uaMessages)
listView.adapter = clAdapter
}
override fun onOptionsItemSelected(item: MenuItem): Boolean {
when (item.itemId) {
android.R.id.home -> {