-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove domain models and use return values instead
- Loading branch information
1 parent
1f9c774
commit 5778656
Showing
25 changed files
with
284 additions
and
352 deletions.
There are no files selected for viewing
16 changes: 7 additions & 9 deletions
16
...androidClient/src/androidMain/kotlin/network/bisq/mobile/client/di/AndroidClientModule.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,22 @@ | ||
package network.bisq.mobile.client.di | ||
|
||
import network.bisq.mobile.android.node.main.bootstrap.ClientApplicationBootstrapFacade | ||
import network.bisq.mobile.android.node.main.bootstrap.ClientApplicationBootstrapModel | ||
import network.bisq.mobile.client.presentation.AndroidClientMainPresenter | ||
import network.bisq.mobile.client.service.ApiRequestService | ||
import network.bisq.mobile.domain.client.main.user_profile.ClientUserProfileModel | ||
import network.bisq.mobile.domain.client.main.user_profile.ClientUserProfileServiceFacade | ||
import network.bisq.mobile.domain.client.main.user_profile.UserProfileApiGateway | ||
import network.bisq.mobile.domain.data.repository.main.bootstrap.ApplicationBootstrapFacade | ||
import network.bisq.mobile.domain.data.repository.main.bootstrap.ApplicationBootstrapModel | ||
import network.bisq.mobile.domain.user_profile.UserProfileModel | ||
import network.bisq.mobile.domain.user_profile.UserProfileServiceFacade | ||
import network.bisq.mobile.presentation.MainPresenter | ||
import network.bisq.mobile.presentation.ui.AppPresenter | ||
import org.koin.dsl.bind | ||
import org.koin.dsl.module | ||
|
||
val androidClientModule = module { | ||
single<ApplicationBootstrapModel> { ClientApplicationBootstrapModel() } | ||
single<ApplicationBootstrapFacade> { ClientApplicationBootstrapFacade(get()) } | ||
single<ApplicationBootstrapFacade> { ClientApplicationBootstrapFacade() } | ||
|
||
single<UserProfileModel> { ClientUserProfileModel() } | ||
single { ApiRequestService(get(), "10.0.2.2") } | ||
single { UserProfileApiGateway(get()) } | ||
single<UserProfileServiceFacade> { ClientUserProfileServiceFacade(get(), get()) } | ||
|
||
single<UserProfileServiceFacade> { ClientUserProfileServiceFacade(get()) } | ||
single<MainPresenter> { AndroidClientMainPresenter(get()) } bind AppPresenter::class | ||
} |
22 changes: 22 additions & 0 deletions
22
.../androidMain/kotlin/network/bisq/mobile/client/presentation/AndroidClientMainPresenter.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package network.bisq.mobile.client.presentation | ||
|
||
import network.bisq.mobile.domain.data.repository.GreetingRepository | ||
import network.bisq.mobile.domain.data.repository.main.bootstrap.ApplicationBootstrapFacade | ||
import network.bisq.mobile.presentation.MainPresenter | ||
|
||
@Suppress("UNCHECKED_CAST") | ||
class AndroidClientMainPresenter( | ||
private val applicationBootstrapFacade: ApplicationBootstrapFacade | ||
) : MainPresenter(GreetingRepository()) { | ||
|
||
// FIXME onViewAttached is called twice | ||
var applicationServiceInited = false | ||
override fun onViewAttached() { | ||
super.onViewAttached() | ||
|
||
if (!applicationServiceInited) { | ||
applicationServiceInited = true | ||
applicationBootstrapFacade.initialize() | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
...kotlin/network/bisq/mobile/android/node/domain/bootstrap/NodeApplicationBootstrapModel.kt
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
...dMain/kotlin/network/bisq/mobile/android/node/domain/user_profile/NodeUserProfileModel.kt
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,6 +35,4 @@ class NodeMainPresenter( | |
supplier.applicationService.shutdown() | ||
super.onDestroying() | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 0 additions & 7 deletions
7
...commonMain/kotlin/network/bisq/mobile/client/bootstrap/ClientApplicationBootstrapModel.kt
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.