1
0
Fork 0
mirror of https://github.com/anyproto/anytype-kotlin.git synced 2025-06-08 05:47:05 +09:00

GO-3753 App | Tech | Refact app params and metrics API interaction (#1605)

This commit is contained in:
Mikhail 2024-11-19 12:06:33 +01:00 committed by GitHub
parent d0edde4726
commit 7d616cfff3
Signed by: github
GPG key ID: B5690EEEBB952194
27 changed files with 139 additions and 122 deletions

View file

@ -78,7 +78,7 @@ class AuthCacheDataStore(private val cache: AuthCache) : AuthDataStore {
throw UnsupportedOperationException()
}
override suspend fun setMetrics(platform: String, version: String) {
override suspend fun setInitialParams(command: Command.SetInitialParams) {
throw UnsupportedOperationException()
}

View file

@ -18,11 +18,8 @@ class AuthDataRepository(
private val debugConfig: DebugConfig
) : AuthRepository {
override suspend fun setMetrics(platform: String, version: String) {
factory.remote.setMetrics(
platform = platform,
version = version
)
override suspend fun setInitialParams(command: Command.SetInitialParams) {
factory.remote.setInitialParams(command = command)
}
override suspend fun selectAccount(

View file

@ -38,7 +38,7 @@ interface AuthDataStore {
suspend fun setCurrentAccount(id: String)
suspend fun getVersion(): String
suspend fun setMetrics(platform: String, version: String)
suspend fun setInitialParams(command: Command.SetInitialParams)
suspend fun getNetworkMode(): NetworkModeConfig
suspend fun setNetworkMode(modeConfig: NetworkModeConfig)

View file

@ -21,5 +21,5 @@ interface AuthRemote {
suspend fun convertWallet(entropy: String): String
suspend fun getVersion(): String
suspend fun setMetrics(platform: String, version: String)
suspend fun setInitialParams(command: Command.SetInitialParams)
}

View file

@ -78,11 +78,8 @@ class AuthRemoteDataStore(
override suspend fun getVersion(): String = authRemote.getVersion()
override suspend fun setMetrics(platform: String, version: String) {
authRemote.setMetrics(
platform = platform,
version = version
)
override suspend fun setInitialParams(command: Command.SetInitialParams) {
authRemote.setInitialParams(command)
}
override suspend fun getNetworkMode(): NetworkModeConfig {