mirror of
https://github.com/nextcloud/talk-android
synced 2025-02-08 15:42:58 +00:00
Merge pull request #4177 from nextcloud/bugfix/3993/fixFlickeringUnreadMentionPopup
Bugfix/3993/fix flickering unread mention popup
This commit is contained in:
commit
58474dd97f
@ -667,9 +667,9 @@ class ConversationsListActivity :
|
|||||||
if (searchHelper != null) {
|
if (searchHelper != null) {
|
||||||
// cancel any pending searches
|
// cancel any pending searches
|
||||||
searchHelper!!.cancelSearch()
|
searchHelper!!.cancelSearch()
|
||||||
|
}
|
||||||
binding.swipeRefreshLayoutView?.isRefreshing = false
|
binding.swipeRefreshLayoutView?.isRefreshing = false
|
||||||
searchBehaviorSubject.onNext(false)
|
searchBehaviorSubject.onNext(false)
|
||||||
}
|
|
||||||
binding.swipeRefreshLayoutView?.isEnabled = true
|
binding.swipeRefreshLayoutView?.isEnabled = true
|
||||||
searchView!!.onActionViewCollapsed()
|
searchView!!.onActionViewCollapsed()
|
||||||
|
|
||||||
@ -1009,13 +1009,15 @@ class ConversationsListActivity :
|
|||||||
newFragment.show(supportFragmentManager, FilterConversationFragment.TAG)
|
newFragment.show(supportFragmentManager, FilterConversationFragment.TAG)
|
||||||
}
|
}
|
||||||
|
|
||||||
binding.newMentionPopupBubble?.hide()
|
binding.newMentionPopupBubble.hide()
|
||||||
binding.newMentionPopupBubble?.setPopupBubbleListener {
|
binding.newMentionPopupBubble.setPopupBubbleListener {
|
||||||
binding.recyclerView?.smoothScrollToPosition(
|
val layoutManager = binding.recyclerView.layoutManager as SmoothScrollLinearLayoutManager?
|
||||||
nextUnreadConversationScrollPosition
|
layoutManager?.scrollToPositionWithOffset(
|
||||||
|
nextUnreadConversationScrollPosition,
|
||||||
|
binding.recyclerView.height / 3
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
binding.newMentionPopupBubble?.let { viewThemeUtils.material.colorMaterialButtonPrimaryFilled(it) }
|
binding.newMentionPopupBubble.let { viewThemeUtils.material.colorMaterialButtonPrimaryFilled(it) }
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun hideLogoForBrandedClients() {
|
private fun hideLogoForBrandedClients() {
|
||||||
@ -1039,14 +1041,14 @@ class ConversationsListActivity :
|
|||||||
val position = adapter!!.getGlobalPositionOf(flexItem)
|
val position = adapter!!.getGlobalPositionOf(flexItem)
|
||||||
if (hasUnreadItems(conversation) && position > lastVisibleItem) {
|
if (hasUnreadItems(conversation) && position > lastVisibleItem) {
|
||||||
nextUnreadConversationScrollPosition = position
|
nextUnreadConversationScrollPosition = position
|
||||||
if (!binding.newMentionPopupBubble?.isShown!!) {
|
if (!binding.newMentionPopupBubble.isShown) {
|
||||||
binding.newMentionPopupBubble?.show()
|
binding.newMentionPopupBubble.show()
|
||||||
}
|
}
|
||||||
return@subscribe
|
return@subscribe
|
||||||
}
|
}
|
||||||
nextUnreadConversationScrollPosition = 0
|
|
||||||
binding.newMentionPopupBubble?.hide()
|
|
||||||
}
|
}
|
||||||
|
nextUnreadConversationScrollPosition = 0
|
||||||
|
binding.newMentionPopupBubble.hide()
|
||||||
} catch (e: NullPointerException) {
|
} catch (e: NullPointerException) {
|
||||||
Log.d(
|
Log.d(
|
||||||
TAG,
|
TAG,
|
||||||
|
@ -161,7 +161,7 @@ object CapabilitiesUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun isUnifiedSearchAvailable(spreedCapabilities: SpreedCapability): Boolean {
|
fun isUnifiedSearchAvailable(spreedCapabilities: SpreedCapability): Boolean {
|
||||||
if (hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.FEDERATION_V1)) {
|
if (!hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.FEDERATION_V1)) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.UNIFIED_SEARCH)
|
return hasSpreedFeatureCapability(spreedCapabilities, SpreedFeatures.UNIFIED_SEARCH)
|
||||||
|
Loading…
Reference in New Issue
Block a user