fix of shared flow size in ExposedKeyValueRepo

This commit is contained in:
InsanusMokrassar 2020-11-16 19:48:28 +06:00
parent 051e03bed3
commit 63921cd984
2 changed files with 5 additions and 2 deletions

View File

@ -2,6 +2,9 @@
## 0.4.1 ## 0.4.1
* `Repos`:
* Fixed error in `ExposedKeyValueRepo` related to negative size of shared flow
## 0.4.0 ## 0.4.0
* `Repos`: * `Repos`:

View File

@ -18,8 +18,8 @@ open class ExposedKeyValueRepo<Key, Value>(
valueColumnAllocator, valueColumnAllocator,
tableName tableName
) { ) {
private val _onNewValue = MutableSharedFlow<Pair<Key, Value>>(Channel.BUFFERED) private val _onNewValue = MutableSharedFlow<Pair<Key, Value>>()
private val _onValueRemoved = MutableSharedFlow<Key>(Channel.BUFFERED) private val _onValueRemoved = MutableSharedFlow<Key>()
override val onNewValue: Flow<Pair<Key, Value>> = _onNewValue.asSharedFlow() override val onNewValue: Flow<Pair<Key, Value>> = _onNewValue.asSharedFlow()
override val onValueRemoved: Flow<Key> = _onValueRemoved.asSharedFlow() override val onValueRemoved: Flow<Key> = _onValueRemoved.asSharedFlow()