Exposes the sample rate on BaseEoseManager class
This commit is contained in:
+2
-1
@@ -40,6 +40,7 @@ interface IEoseManager {
|
|||||||
abstract class BaseEoseManager<T>(
|
abstract class BaseEoseManager<T>(
|
||||||
val client: INostrClient,
|
val client: INostrClient,
|
||||||
val allKeys: () -> Set<T>,
|
val allKeys: () -> Set<T>,
|
||||||
|
val sampleTime: Long = 500,
|
||||||
) : IEoseManager {
|
) : IEoseManager {
|
||||||
protected val logTag: String = this.javaClass.simpleName
|
protected val logTag: String = this.javaClass.simpleName
|
||||||
|
|
||||||
@@ -58,7 +59,7 @@ abstract class BaseEoseManager<T>(
|
|||||||
fun dismissSubscription(subId: String) = orchestrator.dismissSubscription(subId)
|
fun dismissSubscription(subId: String) = orchestrator.dismissSubscription(subId)
|
||||||
|
|
||||||
// Refreshes observers in batches.
|
// Refreshes observers in batches.
|
||||||
private val bundler = BundledUpdate(500, Dispatchers.Default)
|
private val bundler = BundledUpdate(sampleTime, Dispatchers.Default)
|
||||||
|
|
||||||
override fun invalidateFilters(ignoreIfDoing: Boolean) {
|
override fun invalidateFilters(ignoreIfDoing: Boolean) {
|
||||||
bundler.invalidate(ignoreIfDoing, ::forceInvalidate)
|
bundler.invalidate(ignoreIfDoing, ::forceInvalidate)
|
||||||
|
|||||||
Reference in New Issue
Block a user