theme background for dialog-based BottomSheet

Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
Andy Scherzinger 2023-12-13 16:57:40 +01:00
parent c68f733ea0
commit 9621f943f1
No known key found for this signature in database
GPG Key ID: 6CADC7E3523C308B
2 changed files with 4 additions and 2 deletions

View File

@ -948,7 +948,7 @@ class ChatActivity :
private fun initMessageHolders(): MessageHolders {
val messageHolders = MessageHolders()
val profileBottomSheet = ProfileBottomSheet(ncApi, conversationUser!!)
val profileBottomSheet = ProfileBottomSheet(ncApi, conversationUser!!, viewThemeUtils)
val payload = MessagePayload(
roomToken,

View File

@ -40,6 +40,7 @@ import com.nextcloud.talk.models.json.hovercard.HoverCardOverall
import com.nextcloud.talk.ui.bottom.sheet.ProfileBottomSheet.AllowedAppIds.EMAIL
import com.nextcloud.talk.ui.bottom.sheet.ProfileBottomSheet.AllowedAppIds.PROFILE
import com.nextcloud.talk.ui.bottom.sheet.ProfileBottomSheet.AllowedAppIds.SPREED
import com.nextcloud.talk.ui.theme.ViewThemeUtils
import com.nextcloud.talk.utils.ApiUtils
import com.nextcloud.talk.utils.bundle.BundleKeys
import io.reactivex.Observer
@ -49,7 +50,7 @@ import io.reactivex.schedulers.Schedulers
private const val TAG = "ProfileBottomSheet"
class ProfileBottomSheet(val ncApi: NcApi, val userModel: User) {
class ProfileBottomSheet(val ncApi: NcApi, val userModel: User, val viewThemeUtils: ViewThemeUtils) {
private val allowedAppIds = listOf(SPREED.stringValue, PROFILE.stringValue, EMAIL.stringValue)
@ -89,6 +90,7 @@ class ProfileBottomSheet(val ncApi: NcApi, val userModel: User) {
MaterialDialog(context, BottomSheet(LayoutMode.WRAP_CONTENT)).show {
cornerRadius(res = R.dimen.corner_radius)
viewThemeUtils.platform.themeDialog(this.view)
title(text = displayName)
listItemsWithImage(items = items) { _, index, _ ->