diff --git a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt index 6679695d3..14caa42fc 100644 --- a/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt +++ b/app/src/main/java/com/nextcloud/talk/chat/ChatActivity.kt @@ -2070,7 +2070,7 @@ class ChatActivity : private fun onMessageSearchResult(intent: Intent?) { val messageId = intent?.getStringExtra(MessageSearchActivity.RESULT_KEY_MESSAGE_ID) messageId?.let { id -> - scrollToMessageWithId(id) + scrollToAndCenterMessageWithId(id) } } @@ -2825,7 +2825,9 @@ class ChatActivity : } val searchItem = menu.findItem(R.id.conversation_search) - searchItem.isVisible = CapabilitiesUtil.isUnifiedSearchAvailable(spreedCapabilities) + + searchItem.isVisible = CapabilitiesUtil.isUnifiedSearchAvailable(spreedCapabilities) && + currentConversation!!.remoteServer.isNullOrEmpty() if (currentConversation!!.remoteServer != null || !CapabilitiesUtil.isSharedItemsAvailable(spreedCapabilities) diff --git a/app/src/main/java/com/nextcloud/talk/utils/CapabilitiesUtil.kt b/app/src/main/java/com/nextcloud/talk/utils/CapabilitiesUtil.kt index 7329b085a..0a02bd914 100644 --- a/app/src/main/java/com/nextcloud/talk/utils/CapabilitiesUtil.kt +++ b/app/src/main/java/com/nextcloud/talk/utils/CapabilitiesUtil.kt @@ -161,9 +161,6 @@ object CapabilitiesUtil { } fun isUnifiedSearchAvailable(spreedCapabilities: SpreedCapability): Boolean { - if (!hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.FEDERATION_V1)) { - return false - } return hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.UNIFIED_SEARCH) }