mirror of
https://github.com/nextcloud/talk-android
synced 2025-03-06 14:27:24 +00:00
theme reactions bottomsheet
Signed-off-by: Andy Scherzinger <info@andy-scherzinger.de>
This commit is contained in:
parent
e9d304a79b
commit
234e97502b
@ -154,6 +154,7 @@ import com.nextcloud.talk.ui.dialog.MessageActionsDialog
|
||||
import com.nextcloud.talk.ui.dialog.ShowReactionsDialog
|
||||
import com.nextcloud.talk.ui.recyclerview.MessageSwipeActions
|
||||
import com.nextcloud.talk.ui.recyclerview.MessageSwipeCallback
|
||||
import com.nextcloud.talk.ui.theme.ServerTheme
|
||||
import com.nextcloud.talk.ui.theme.ViewThemeUtils
|
||||
import com.nextcloud.talk.utils.ApiUtils
|
||||
import com.nextcloud.talk.utils.AttendeePermissionsUtil
|
||||
@ -239,6 +240,9 @@ class ChatController(args: Bundle) :
|
||||
@Inject
|
||||
lateinit var viewThemeUtils: ViewThemeUtils
|
||||
|
||||
@Inject
|
||||
lateinit var serverTheme: ServerTheme
|
||||
|
||||
val disposables = DisposableSet()
|
||||
|
||||
var roomToken: String? = null
|
||||
@ -2681,7 +2685,8 @@ class ChatController(args: Bundle) :
|
||||
chatMessage,
|
||||
conversationUser,
|
||||
hasChatPermission,
|
||||
ncApi!!
|
||||
ncApi!!,
|
||||
serverTheme
|
||||
).show()
|
||||
}
|
||||
}
|
||||
|
@ -51,6 +51,7 @@ import com.nextcloud.talk.models.json.chat.ChatMessage
|
||||
import com.nextcloud.talk.models.json.conversations.Conversation
|
||||
import com.nextcloud.talk.models.json.generic.GenericOverall
|
||||
import com.nextcloud.talk.models.json.reactions.ReactionsOverall
|
||||
import com.nextcloud.talk.ui.theme.ServerTheme
|
||||
import com.nextcloud.talk.utils.ApiUtils
|
||||
import io.reactivex.Observer
|
||||
import io.reactivex.android.schedulers.AndroidSchedulers
|
||||
@ -65,7 +66,8 @@ class ShowReactionsDialog(
|
||||
private val chatMessage: ChatMessage,
|
||||
private val user: User?,
|
||||
private val hasChatPermission: Boolean,
|
||||
private val ncApi: NcApi
|
||||
private val ncApi: NcApi,
|
||||
private val serverTheme: ServerTheme
|
||||
) : BottomSheetDialog(activity), ReactionItemClickListener {
|
||||
|
||||
private lateinit var binding: DialogMessageReactionsBinding
|
||||
@ -96,6 +98,7 @@ class ShowReactionsDialog(
|
||||
adapter?.list?.clear()
|
||||
if (chatMessage.reactions != null && chatMessage.reactions!!.isNotEmpty()) {
|
||||
var reactionsTotal = 0
|
||||
binding.emojiReactionsTabs.setSelectedTabIndicatorColor(serverTheme.primaryColor)
|
||||
for ((emoji, amount) in chatMessage.reactions!!) {
|
||||
reactionsTotal = reactionsTotal.plus(amount as Int)
|
||||
val tab: TabLayout.Tab = binding.emojiReactionsTabs.newTab() // Create a new Tab names "First Tab"
|
||||
|
Loading…
Reference in New Issue
Block a user