When a user clicks a chat, UIKit opens a chatroom page
Usage
Create a Fragment
class MainActivity : AppCompatActivity(), IRecentChatItemClickListener {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.activity_main)
val recentChatFragment = AmityRecentChatFragment.newInstance()
/**
* set the listener to override recentItem click event
* No Need to implement [IRecentChatClickListener] if you don't want to override click event
*/
.recentChatItemClickListener(this)
.build(this)
val transaction = supportFragmentManager.beginTransaction()
transaction.replace(R.id.fragmentContainer, recentChatFragment)
transaction.addToBackStack(null)
transaction.commit()
}
}