-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#24] Logout UI integration with test
[#22] Rebase fix test [#21] Rebase [#23] Fix KIF tests [#23] Fix KIF tests [#24] Logout UI integration with test
- Loading branch information
Showing
22 changed files
with
336 additions
and
21 deletions.
There are no files selected for viewing
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
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
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: 7 additions & 0 deletions
7
shared/src/androidMain/kotlin/co/nimblehq/blisskmmic/domain/platform/VersionCodeImpl.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,7 @@ | ||
package co.nimblehq.blisskmmic.domain.platform | ||
|
||
actual class VersionCodeImpl: VersionCode { | ||
// TODO: implement version for Android | ||
actual override val versionCode = "" | ||
actual override val buildNumber = "" | ||
} |
20 changes: 20 additions & 0 deletions
20
shared/src/commonMain/kotlin/co/nimblehq/blisskmmic/data/repository/AppInfoRepositoryImpl.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,20 @@ | ||
package co.nimblehq.blisskmmic.data.repository | ||
|
||
import co.nimblehq.blisskmmic.domain.platform.VersionCode | ||
import co.nimblehq.blisskmmic.domain.repository.AppInfoRepository | ||
import kotlinx.coroutines.flow.Flow | ||
import kotlinx.coroutines.flow.flow | ||
import kotlinx.coroutines.flow.flowOf | ||
|
||
class AppInfoRepositoryImpl( | ||
private val version: VersionCode | ||
): AppInfoRepository { | ||
|
||
override fun getAppVersion(): Flow<String> { | ||
return flowOf(version.versionCode) | ||
} | ||
|
||
override fun getAppBuildNumber(): Flow<String> { | ||
return flowOf(version.buildNumber) | ||
} | ||
} |
3 changes: 3 additions & 0 deletions
3
shared/src/commonMain/kotlin/co/nimblehq/blisskmmic/di/koin/modules/DomainHelperModule.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,9 +1,12 @@ | ||
package co.nimblehq.blisskmmic.di.koin.modules | ||
|
||
import co.nimblehq.blisskmmic.domain.platform.VersionCode | ||
import co.nimblehq.blisskmmic.domain.platform.VersionCodeImpl | ||
import co.nimblehq.blisskmmic.domain.platform.datetime.DateTimeFormatter | ||
import co.nimblehq.blisskmmic.domain.platform.datetime.DateTimeFormatterImpl | ||
import org.koin.dsl.module | ||
|
||
val domainHelperModule = module { | ||
single<DateTimeFormatter> { DateTimeFormatterImpl() } | ||
single<VersionCode> { VersionCodeImpl() } | ||
} |
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
6 changes: 6 additions & 0 deletions
6
shared/src/commonMain/kotlin/co/nimblehq/blisskmmic/domain/model/AppVersion.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,6 @@ | ||
package co.nimblehq.blisskmmic.domain.model | ||
|
||
data class AppVersion ( | ||
val appVersion: String, | ||
val buildNumber: String | ||
) |
11 changes: 11 additions & 0 deletions
11
shared/src/commonMain/kotlin/co/nimblehq/blisskmmic/domain/platform/VersionCode.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,11 @@ | ||
package co.nimblehq.blisskmmic.domain.platform | ||
|
||
interface VersionCode { | ||
val versionCode: String | ||
val buildNumber: String | ||
} | ||
|
||
expect class VersionCodeImpl(): VersionCode { | ||
override val versionCode: String | ||
override val buildNumber: String | ||
} |
8 changes: 8 additions & 0 deletions
8
shared/src/commonMain/kotlin/co/nimblehq/blisskmmic/domain/repository/AppInfoRepository.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,8 @@ | ||
package co.nimblehq.blisskmmic.domain.repository | ||
|
||
import kotlinx.coroutines.flow.Flow | ||
|
||
interface AppInfoRepository { | ||
fun getAppVersion(): Flow<String> | ||
fun getAppBuildNumber(): Flow<String> | ||
} |
24 changes: 24 additions & 0 deletions
24
shared/src/commonMain/kotlin/co/nimblehq/blisskmmic/domain/usecase/GetAppVersionUseCase.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,24 @@ | ||
package co.nimblehq.blisskmmic.domain.usecase | ||
|
||
import co.nimblehq.blisskmmic.domain.model.AppVersion | ||
import co.nimblehq.blisskmmic.domain.repository.AppInfoRepository | ||
import kotlinx.coroutines.flow.Flow | ||
import kotlinx.coroutines.flow.zip | ||
|
||
interface GetAppVersionUseCase { | ||
|
||
operator fun invoke(): Flow<AppVersion> | ||
} | ||
|
||
class GetAppVersionUseCaseImpl( | ||
private val appInfoRepository: AppInfoRepository | ||
) : GetAppVersionUseCase { | ||
|
||
override fun invoke(): Flow<AppVersion> { | ||
return appInfoRepository | ||
.getAppVersion() | ||
.zip(appInfoRepository.getAppBuildNumber()) { version, build -> | ||
AppVersion(version, build) | ||
} | ||
} | ||
} |
7 changes: 7 additions & 0 deletions
7
shared/src/commonMain/kotlin/co/nimblehq/blisskmmic/presentation/model/AccountUiModel.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,7 @@ | ||
package co.nimblehq.blisskmmic.presentation.model | ||
|
||
data class AccountUiModel ( | ||
val imageUrl: String?, | ||
val name: String, | ||
val appVersion: String | ||
) |
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
Oops, something went wrong.