mirror of
https://github.com/nextcloud/talk-android.git
synced 2024-11-21 20:45:29 +03:00
Merge pull request #4306 from nextcloud/bugfix/4276/fixSearchAvailability
Bugfix/4276/fix search availability
This commit is contained in:
commit
3073279005
2 changed files with 4 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -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