Skip to content

Commit

Permalink
Merge branch 'inconsistent-behavior-of-the-account-history-droid-519'
Browse files Browse the repository at this point in the history
  • Loading branch information
Pururun committed Nov 22, 2023
2 parents 5d67b95 + c1c2cba commit 507e5c9
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ class DispatchingHandler<T : Any>(looper: Looper, private val extractor: (Messag
private val handlers = HashMap<KClass<out T>, (T) -> Unit>()
private val lock = ReentrantReadWriteLock()

private val _parsedMessages = MutableSharedFlow<T>(extraBufferCapacity = 1)
private val _parsedMessages =
MutableSharedFlow<T>(extraBufferCapacity = MESSAGES_BUFFER_CAPACITY)
val parsedMessages = _parsedMessages.asSharedFlow()

@Deprecated("Use parsedMessages instead.")
Expand Down Expand Up @@ -45,4 +46,8 @@ class DispatchingHandler<T : Any>(looper: Looper, private val extractor: (Messag

removeCallbacksAndMessages(null)
}

companion object {
private const val MESSAGES_BUFFER_CAPACITY = 10
}
}

0 comments on commit 507e5c9

Please sign in to comment.