switch back to debounce
This commit is contained in:
+5
-6
@@ -22,7 +22,6 @@ import kotlinx.coroutines.flow.debounce
|
|||||||
import kotlinx.coroutines.flow.distinctUntilChanged
|
import kotlinx.coroutines.flow.distinctUntilChanged
|
||||||
import kotlinx.coroutines.flow.map
|
import kotlinx.coroutines.flow.map
|
||||||
import kotlinx.coroutines.flow.mapNotNull
|
import kotlinx.coroutines.flow.mapNotNull
|
||||||
import kotlinx.coroutines.flow.sample
|
|
||||||
import mozilla.components.browser.state.action.BrowserAction
|
import mozilla.components.browser.state.action.BrowserAction
|
||||||
import mozilla.components.browser.state.state.BrowserState
|
import mozilla.components.browser.state.state.BrowserState
|
||||||
import mozilla.components.feature.addons.logger
|
import mozilla.components.feature.addons.logger
|
||||||
@@ -67,7 +66,7 @@ class Events(
|
|||||||
it.content
|
it.content
|
||||||
}
|
}
|
||||||
.ifAnyChanged { arrayOf(it.content.icon) }
|
.ifAnyChanged { arrayOf(it.content.icon) }
|
||||||
.sample(50)
|
.debounce(15)
|
||||||
.collect { tab ->
|
.collect { tab ->
|
||||||
val iconBytes = tab.content.icon?.toWebPBytes()
|
val iconBytes = tab.content.icon?.toWebPBytes()
|
||||||
flutterEvents.onIconChange(
|
flutterEvents.onIconChange(
|
||||||
@@ -83,7 +82,7 @@ class Events(
|
|||||||
.filterChanged {
|
.filterChanged {
|
||||||
it.content.securityInfo
|
it.content.securityInfo
|
||||||
}
|
}
|
||||||
.sample(50)
|
.debounce(15)
|
||||||
.collect { tab ->
|
.collect { tab ->
|
||||||
flutterEvents.onSecurityInfoStateChange(
|
flutterEvents.onSecurityInfoStateChange(
|
||||||
System.currentTimeMillis(),
|
System.currentTimeMillis(),
|
||||||
@@ -108,7 +107,7 @@ class Events(
|
|||||||
it.readerState.active,
|
it.readerState.active,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.sample(50)
|
.debounce(25)
|
||||||
.collect { tab ->
|
.collect { tab ->
|
||||||
flutterEvents.onReaderableStateChange(
|
flutterEvents.onReaderableStateChange(
|
||||||
System.currentTimeMillis(),
|
System.currentTimeMillis(),
|
||||||
@@ -133,7 +132,7 @@ class Events(
|
|||||||
it.content.canGoForward,
|
it.content.canGoForward,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.sample(50)
|
.debounce(15)
|
||||||
.collect { tab ->
|
.collect { tab ->
|
||||||
flutterEvents.onHistoryStateChange(
|
flutterEvents.onHistoryStateChange(
|
||||||
System.currentTimeMillis(),
|
System.currentTimeMillis(),
|
||||||
@@ -168,7 +167,7 @@ class Events(
|
|||||||
it.content.loading
|
it.content.loading
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.sample(50)
|
.debounce(15)
|
||||||
.collect { tab ->
|
.collect { tab ->
|
||||||
flutterEvents.onTabContentStateChange(
|
flutterEvents.onTabContentStateChange(
|
||||||
System.currentTimeMillis(),
|
System.currentTimeMillis(),
|
||||||
|
|||||||
Reference in New Issue
Block a user