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:
parent
d0edde4726
commit
7d616cfff3
27 changed files with 139 additions and 122 deletions
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
}
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue