Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/talk-android.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app/src
diff options
context:
space:
mode:
authorMarcel Hibbe <dev@mhibbe.de>2022-09-21 13:16:54 +0300
committerMarcel Hibbe <dev@mhibbe.de>2022-09-21 13:16:54 +0300
commit54f5c6f2f67d469da0a5692890488aeacf419230 (patch)
treec7880075f28a7617b45986cb54604e78bbf7cc83 /app/src
parent91bc2abfa97566c4864cbbb47ccce028bccab0c2 (diff)
hide poll creation for 1:1 conversationsbugfix/noid/hidePollCreationForOneToOne
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Diffstat (limited to 'app/src')
-rw-r--r--app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt6
-rw-r--r--app/src/main/java/com/nextcloud/talk/ui/dialog/AttachmentDialog.kt4
2 files changed, 6 insertions, 4 deletions
diff --git a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt
index b9fb8c08a..8a1502543 100644
--- a/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt
+++ b/app/src/main/java/com/nextcloud/talk/controllers/ChatController.kt
@@ -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())
diff --git a/app/src/main/java/com/nextcloud/talk/ui/dialog/AttachmentDialog.kt b/app/src/main/java/com/nextcloud/talk/ui/dialog/AttachmentDialog.kt
index 5d9d4e082..55ae66898 100644
--- a/app/src/main/java/com/nextcloud/talk/ui/dialog/AttachmentDialog.kt
+++ b/app/src/main/java/com/nextcloud/talk/ui/dialog/AttachmentDialog.kt
@@ -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
}