Updated on 2026-08-14
This commit is contained in:
parent
ebbce95832
commit
896da1def0
20 changed files with 564 additions and 9 deletions
|
|
@ -5,10 +5,10 @@ import com.squareup.moshi.JsonClass
|
|||
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class NotificationApplicationCreateBody(
|
||||
@Json(name = "pushToken") val pushToken: String,
|
||||
@Json(name = "platform") val platform: String,
|
||||
@Json(name = "device") val device: String,
|
||||
@Json(name = "systemVersion") val systemVersion: String,
|
||||
@Json(name = "language") val language: String,
|
||||
@Json(name = "timezone") val timezone: String,
|
||||
@Json(name = "pushToken") val pushToken: String? = null,
|
||||
@Json(name = "platform") val platform: String? = null,
|
||||
@Json(name = "device") val device: String? = null,
|
||||
@Json(name = "systemVersion") val systemVersion: String? = null,
|
||||
@Json(name = "language") val language: String? = null,
|
||||
@Json(name = "timezone") val timezone: String? = null,
|
||||
)
|
||||
|
|
@ -5,6 +5,6 @@ import com.squareup.moshi.JsonClass
|
|||
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class WalletBody(
|
||||
@Json(name = "notifyStatus") val notifyStatus: String? = null,
|
||||
@Json(name = "notifyStatus") val notifyStatus: Boolean? = null,
|
||||
@Json(name = "name") val name: String? = null,
|
||||
)
|
||||
|
|
@ -5,7 +5,7 @@ import com.squareup.moshi.JsonClass
|
|||
|
||||
@JsonClass(generateAdapter = true)
|
||||
data class WalletResponse(
|
||||
@Json(name = "notifyStatus") val notifyStatus: String? = null,
|
||||
@Json(name = "name") val name: String? = null,
|
||||
@Json(name = "notifyStatus") val notifyStatus: Boolean,
|
||||
@Json(name = "id") val id: String,
|
||||
@Json(name = "name") val name: String? = null,
|
||||
)
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
package com.tangem.datasource.di
|
||||
|
||||
import com.tangem.datasource.info.AndroidAppInfoProvider
|
||||
import com.tangem.utils.info.AppInfoProvider
|
||||
import com.tangem.utils.version.AppVersionProvider
|
||||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import dagger.hilt.InstallIn
|
||||
import dagger.hilt.components.SingletonComponent
|
||||
import javax.inject.Singleton
|
||||
|
||||
@Module
|
||||
@InstallIn(SingletonComponent::class)
|
||||
internal object AppInfoModule {
|
||||
|
||||
@Singleton
|
||||
@Provides
|
||||
fun provideAppInfoProvider(appVersionProvider: AppVersionProvider): AppInfoProvider {
|
||||
return AndroidAppInfoProvider(appVersionProvider)
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,25 @@
|
|||
package com.tangem.datasource.info
|
||||
|
||||
import android.os.Build
|
||||
import com.tangem.utils.SupportedLanguages
|
||||
import com.tangem.utils.info.AppInfoProvider
|
||||
import com.tangem.utils.version.AppVersionProvider
|
||||
import java.util.*
|
||||
import javax.inject.Inject
|
||||
|
||||
internal class AndroidAppInfoProvider @Inject constructor(
|
||||
private val appVersionProvider: AppVersionProvider,
|
||||
) : AppInfoProvider {
|
||||
override val platform: String
|
||||
get() = "Android"
|
||||
override val device: String
|
||||
get() = "${Build.MANUFACTURER} ${Build.MODEL}"
|
||||
override val osVersion: String
|
||||
get() = Build.VERSION.RELEASE
|
||||
override val language: String
|
||||
get() = SupportedLanguages.getCurrentSupportedLanguageCode()
|
||||
override val timezone: String
|
||||
get() = TimeZone.getDefault().id
|
||||
override val appVersion: String
|
||||
get() = appVersionProvider.versionName
|
||||
}
|
||||
|
|
@ -123,6 +123,10 @@ object PreferencesKeys {
|
|||
|
||||
val WALLETS_NFT_ENABLED_STATES_KEY by lazy { stringPreferencesKey(name = "walletsNftEnabledStates") }
|
||||
|
||||
// region Notifications
|
||||
val NOTIFICATIONS_APPLICATION_ID_KEY by lazy { stringPreferencesKey(name = "notificationsApplicationId") }
|
||||
// endregion
|
||||
|
||||
fun getShouldShowStoriesKey(storyId: String) = booleanPreferencesKey("shouldShowStories_$storyId")
|
||||
|
||||
// region Permission
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue