mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 11:39:42 +01:00
Merge pull request #2414 from nextcloud/bugfix/noid/hidePollCreationForOneToOne
hide poll creation for 1:1 conversations
This commit is contained in:
commit
009dbaf292
@ -452,7 +452,7 @@ class ChatController(args: Bundle) :
|
||||
}
|
||||
|
||||
private fun loadAvatarForStatusBar() {
|
||||
if (inOneToOneCall() && activity != null) {
|
||||
if (isOneToOneConversation() && activity != null) {
|
||||
val imageRequest = DisplayUtils.getImageRequestForUrl(
|
||||
ApiUtils.getUrlForAvatar(
|
||||
conversationUser?.baseUrl,
|
||||
@ -493,7 +493,7 @@ class ChatController(args: Bundle) :
|
||||
}
|
||||
}
|
||||
|
||||
private fun inOneToOneCall() = currentConversation != null && currentConversation?.type != null &&
|
||||
fun isOneToOneConversation() = currentConversation != null && currentConversation?.type != null &&
|
||||
currentConversation?.type == Conversation.ConversationType
|
||||
.ROOM_TYPE_ONE_TO_ONE_CALL
|
||||
|
||||
@ -1675,7 +1675,7 @@ class ChatController(args: Bundle) :
|
||||
val bundle = Bundle()
|
||||
bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, conversationUser)
|
||||
bundle.putString(KEY_ROOM_TOKEN, roomToken)
|
||||
bundle.putBoolean(BundleKeys.KEY_ROOM_ONE_TO_ONE, inOneToOneCall())
|
||||
bundle.putBoolean(BundleKeys.KEY_ROOM_ONE_TO_ONE, isOneToOneConversation())
|
||||
router.pushController(
|
||||
RouterTransaction.with(ConversationInfoController(bundle))
|
||||
.pushChangeHandler(HorizontalChangeHandler())
|
||||
|
@ -79,7 +79,9 @@ class AttachmentDialog(val activity: Activity, var chatController: ChatControlle
|
||||
dialogAttachmentBinding.menuShareLocation.visibility = View.GONE
|
||||
}
|
||||
|
||||
if (!CapabilitiesUtilNew.hasSpreedFeatureCapability(chatController.conversationUser, "talk-polls")) {
|
||||
if (!CapabilitiesUtilNew.hasSpreedFeatureCapability(chatController.conversationUser, "talk-polls") ||
|
||||
chatController.isOneToOneConversation()
|
||||
) {
|
||||
dialogAttachmentBinding.menuAttachPoll.visibility = View.GONE
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user