mirror of
https://github.com/InsanusMokrassar/PsychomatrixBase.git
synced 2024-11-24 19:18:53 +00:00
fixes
This commit is contained in:
parent
7e7d00881f
commit
4b534b6b16
@ -9,8 +9,7 @@ open class UseCasesDIImpl(
|
||||
entitiesDI: EntitiesDI
|
||||
) : UseCasesDI, EntitiesDI by entitiesDI {
|
||||
|
||||
val calculatePsychomatrixByDateUseCase: CalculatePsychomatrixByDateUseCase by lazy {
|
||||
override val calculatePsychomatrixByDateUseCase: CalculatePsychomatrixByDateUseCase by lazy {
|
||||
CalculatePsychomatrixByDateUseCaseInteractor()
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ import kotlinx.coroutines.experimental.channels.ReceiveChannel
|
||||
import org.joda.time.DateTime
|
||||
import java.util.*
|
||||
|
||||
interface CalculatePsychomatrixByDate {
|
||||
interface CalculatePsychomatrixByDateUseCase {
|
||||
suspend fun calculate(date: Long): Deferred<Psychomatrix>
|
||||
suspend fun calculate(date: DateTime): Deferred<Psychomatrix>
|
||||
suspend fun calculate(date: Date): Deferred<Psychomatrix>
|
||||
|
@ -17,19 +17,21 @@ class MutablePsychomatrix(date: DateTime) : Psychomatrix(date) {
|
||||
|
||||
constructor(psychomatrix: Psychomatrix): this(psychomatrix.date)
|
||||
|
||||
val operationsHistory: List<Operation>
|
||||
get() = mutableOperationsHistory
|
||||
val operationsHistory: Deferred<List<Operation>>
|
||||
get() = async {
|
||||
mutableOperationsHistory
|
||||
}
|
||||
|
||||
val availableOperations: Deferred<List<Operation>>
|
||||
get() = async {
|
||||
availableConverts.await().plus(availableInverts.await())
|
||||
}
|
||||
|
||||
private val availableConverts: Deferred<List<Operation>>
|
||||
val availableConverts: Deferred<List<Operation>>
|
||||
get() = async {
|
||||
availableConverts(mutableNumbers, mutableOperationsHistory)
|
||||
}
|
||||
private val availableInverts: Deferred<List<Operation>>
|
||||
val availableInverts: Deferred<List<Operation>>
|
||||
get() = async {
|
||||
availableInverts(mutableNumbers, mutableOperationsHistory)
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
package com.github.insanusmokrassar.PsychomatrixBase.domain.interactors
|
||||
|
||||
import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.CalculatePsychomatrixByDate
|
||||
import com.github.insanusmokrassar.PsychomatrixBase.domain.UseCases.CalculatePsychomatrixByDateUseCase
|
||||
import com.github.insanusmokrassar.PsychomatrixBase.domain.entities.Psychomatrix
|
||||
import com.github.insanusmokrassar.PsychomatrixBase.utils.extensions.SUBSCRIPTIONS_MEDIUM
|
||||
import kotlinx.coroutines.experimental.Deferred
|
||||
@ -10,7 +10,7 @@ import kotlinx.coroutines.experimental.channels.ReceiveChannel
|
||||
import org.joda.time.DateTime
|
||||
import java.util.*
|
||||
|
||||
class CalculatePsychomatrixByDateInteractor : CalculatePsychomatrixByDate {
|
||||
class CalculatePsychomatrixByDateUseCaseInteractor : CalculatePsychomatrixByDateUseCase {
|
||||
private val psychomatrixCreatedBroadcast = BroadcastChannel<Psychomatrix>(SUBSCRIPTIONS_MEDIUM)
|
||||
|
||||
override suspend fun calculate(date: Long): Deferred<Psychomatrix> {
|
||||
|
@ -0,0 +1,4 @@
|
||||
package com.github.insanusmokrassar.PsychomatrixBase.presentation.presenters
|
||||
|
||||
interface PsychomatrixChangerPresenter {
|
||||
}
|
Loading…
Reference in New Issue
Block a user