瀏覽代碼

hide actions for federated rooms

Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Marcel Hibbe 1 年之前
父節點
當前提交
5fead79743
共有 1 個文件被更改,包括 9 次插入0 次删除
  1. 9 0
      app/src/main/java/com/nextcloud/talk/ui/dialog/AttachmentDialog.kt

+ 9 - 0
app/src/main/java/com/nextcloud/talk/ui/dialog/AttachmentDialog.kt

@@ -73,6 +73,15 @@ class AttachmentDialog(val activity: Activity, var chatActivity: ChatActivity) :
     }
 
     private fun initItemsVisibility() {
+        if (!chatActivity.currentConversation!!.remoteServer.isNullOrEmpty()) {
+            dialogAttachmentBinding.menuAttachContact.visibility = View.GONE
+            dialogAttachmentBinding.menuShareLocation.visibility = View.GONE
+            dialogAttachmentBinding.menuAttachPictureFromCam.visibility = View.GONE
+            dialogAttachmentBinding.menuAttachVideoFromCam.visibility = View.GONE
+            dialogAttachmentBinding.menuAttachFileFromLocal.visibility = View.GONE
+            dialogAttachmentBinding.menuAttachFileFromCloud.visibility = View.GONE
+        }
+
         if (!CapabilitiesUtil.hasSpreedFeatureCapability(
                 chatActivity.spreedCapabilities,
                 SpreedFeatures.GEO_LOCATION_SHARING