mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-24 22:15:41 +03:00
Merge pull request #4307 from nextcloud/backport/4306/stable-20.0
[stable-20.0] Bugfix/4276/fix search availability
This commit is contained in:
commit
251778491d
2 changed files with 4 additions and 5 deletions
|
@ -2059,7 +2059,7 @@ class ChatActivity :
|
|||
private fun onMessageSearchResult(intent: Intent?) {
|
||||
val messageId = intent?.getStringExtra(MessageSearchActivity.RESULT_KEY_MESSAGE_ID)
|
||||
messageId?.let { id ->
|
||||
scrollToMessageWithId(id)
|
||||
scrollToAndCenterMessageWithId(id)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2810,7 +2810,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)
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue