mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
[platform UI][se] IJPL-227258 Reset freezer on list invalidation
..., so the new upcoming results would be sorted appropriately. + added a short throttling in case of all the essential providers are finished. That helps to avoid blinking when essential providers don't have results, but non-essential Text and Actions generate same results in consequent search requests. GitOrigin-RevId: cc27304a979d93285e098007c0c28aeee4ed6121
This commit is contained in:
committed by
intellij-monorepo-bot
parent
464c38be0a
commit
c2d927a4b7
@@ -46,6 +46,7 @@ class SeResultListModel(private val searchStatePublisher: SeSearchStatePublisher
|
||||
SeLog.log(SeLog.THROTTLING) { "Will invalidate result list model" }
|
||||
_isValidState.value = false
|
||||
isValidAndHasOnlySemantic = false
|
||||
freezer.reset()
|
||||
}
|
||||
|
||||
fun removeLoadingItem() {
|
||||
|
||||
@@ -363,7 +363,7 @@ private fun Flow<SeResultEvent>.throttleUntilEssentialsArrive(essentialProviderI
|
||||
}
|
||||
}
|
||||
|
||||
return@throttledWithAccumulation if (essentialProvidersCounts.isEmpty()) 0
|
||||
return@throttledWithAccumulation if (essentialProvidersCounts.isEmpty()) ESSENTIALS_THROTTLE_DELAY
|
||||
else if (essentialProvidersCounts.values.all { it >= ESSENTIALS_ENOUGH_COUNT }) 0
|
||||
else if (essentialProvidersCounts.values.all { it > 0 }) ESSENTIALS_THROTTLE_DELAY
|
||||
else null
|
||||
|
||||
Reference in New Issue
Block a user