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:
authorTim Krüger <t@timkrueger.me>2022-09-23 13:26:56 +0300
committerGitHub <noreply@github.com>2022-09-23 13:26:56 +0300
commit009dbaf2928633de0b742efa9750c147bde07c30 (patch)
treedc2014bcdd02365f744bfaaa284defd5a0b0360b /app/src
parentdad99a30ba783fe943dd911c28cbd586c3d7646d (diff)
parent54f5c6f2f67d469da0a5692890488aeacf419230 (diff)
Merge pull request #2414 from nextcloud/bugfix/noid/hidePollCreationForOneToOne
hide poll creation for 1:1 conversations
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
}