Updated on 2026-08-14

This commit is contained in:
Tangem 2024-03-09 09:51:23 +08:00
parent eee206bec1
commit 675d13ab6f
15 changed files with 316 additions and 20 deletions

View file

@ -3,10 +3,8 @@ package com.tangem.data.settings
import com.tangem.data.source.preferences.PreferencesDataSource
import com.tangem.datasource.local.preferences.AppPreferencesStore
import com.tangem.datasource.local.preferences.PreferencesKeys
import com.tangem.datasource.local.preferences.utils.getObjectMap
import com.tangem.datasource.local.preferences.utils.getSyncOrDefault
import com.tangem.datasource.local.preferences.utils.store
import com.tangem.domain.settings.models.AppLogsModel
import com.tangem.domain.settings.repositories.SettingsRepository
import com.tangem.utils.coroutines.CoroutineDispatcherProvider
import kotlinx.coroutines.withContext
@ -36,11 +34,6 @@ internal class DefaultSettingsRepository(
)
}
override suspend fun getAppLogs(): List<AppLogsModel> {
return appPreferencesStore.getObjectMap<String>(key = PreferencesKeys.APP_LOGS_KEY)
.map { AppLogsModel(timestamp = it.key.toLong(), message = it.value) }
}
override suspend fun updateAppLogs(message: String) {
val newLogs = DateTime.now().millis.toString() to message