File tree Expand file tree Collapse file tree 3 files changed +5
-7
lines changed
pools/src/main/kotlin/com/flipcash/app/pools
session/src/main/kotlin/com/flipcash/app/session/internal Expand file tree Collapse file tree 3 files changed +5
-7
lines changed Original file line number Diff line number Diff line change 11package com.flipcash.app.pools
22
3- import com.flipcash.app.core.cache.CachePolicy
43import com.flipcash.app.core.updater.NetworkUpdater
54import com.getcode.opencode.model.core.ID
65import com.getcode.utils.base58
Original file line number Diff line number Diff line change @@ -59,8 +59,6 @@ class PoolsCoordinator @Inject constructor(
5959 private val networkToDomainMapper : NetworkPoolToDomainMapper ,
6060 private val userManager : UserManager ,
6161) {
62- val supervisor = CoroutineScope (Dispatchers .IO + SupervisorJob ())
63-
6462 private val pagingConfig = PagingConfig (pageSize = 20 )
6563
6664 private val _poolOpen = MutableStateFlow <ID ?>(null )
@@ -143,7 +141,11 @@ class PoolsCoordinator @Inject constructor(
143141 }
144142
145143 suspend fun updatePool (id : ID ) {
146- getPool(id, CachePolicy .NetworkOnly )
144+ val pool = dataSource.getById(id)
145+ val hasDecision = pool?.pool?.resolution is PoolResolution .DecisionMade
146+ if (! hasDecision) {
147+ getPool(id, CachePolicy .NetworkOnly )
148+ }
147149 }
148150
149151 suspend fun getPool (rendezvous : KeyPair ): Result <PoolWithBets > {
Original file line number Diff line number Diff line change @@ -338,9 +338,6 @@ class RealSessionController @Inject constructor(
338338 scope.launch {
339339 poolsCoordinator.updatePools()
340340 }
341- scope.launch {
342- poolsCoordinator.fetchSinceLatest(count)
343- }
344341 }
345342 }
346343
You can’t perform that action at this time.
0 commit comments