refactor messages to Room database

This commit is contained in:
andrekir 2022-09-15 22:24:04 -03:00
parent ab7bf4922b
commit 65e982ddd5
12 changed files with 191 additions and 279 deletions

View file

@ -166,11 +166,12 @@ class UsersFragment : ScreenFragment("Users"), Logging {
}
}
holder.itemView.setOnLongClickListener {
if (position > 0) {
debug("calling MessagesFragment filter:${n.user?.id}")
val node = n.user
if (position > 0 && node != null) {
debug("calling MessagesFragment filter:${node.id}")
setFragmentResult(
"requestKey",
bundleOf("contactId" to n.user?.id, "contactName" to name)
bundleOf("contactKey" to "0${node.id}", "contactName" to name)
)
parentFragmentManager.beginTransaction()
.replace(R.id.mainActivityLayout, MessagesFragment())