Updated on 2026-08-14
This commit is contained in:
parent
16e32259c6
commit
27ae1ee2a0
6 changed files with 72 additions and 69 deletions
|
|
@ -1,62 +0,0 @@
|
|||
package com.tangem.tap.domain.configurable.warningMessage
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import com.squareup.moshi.Json
|
||||
import com.tangem.blockchain.common.Blockchain
|
||||
|
||||
/**
|
||||
[REDACTED_AUTHOR]
|
||||
*/
|
||||
data class WarningMessage(
|
||||
val title: String,
|
||||
val message: String,
|
||||
val type: Type,
|
||||
val priority: Priority,
|
||||
val location: List<Location>,
|
||||
private val blockchains: List<String>?,
|
||||
@StringRes val titleResId: Int? = null,
|
||||
@StringRes val messageResId: Int? = null,
|
||||
val origin: Origin = Origin.Remote,
|
||||
@StringRes val buttonTextId: Int? = null,
|
||||
val titleFormatArg: String? = null,
|
||||
val messageFormatArg: String? = null,
|
||||
) {
|
||||
val blockchainList: List<Blockchain>? by lazy {
|
||||
blockchains?.map { Blockchain.fromId(it.uppercase()) }
|
||||
}
|
||||
|
||||
var isHidden = false
|
||||
|
||||
enum class Priority {
|
||||
@Json(name = "critical")
|
||||
Critical,
|
||||
|
||||
@Json(name = "warning")
|
||||
Warning,
|
||||
|
||||
@Json(name = "info")
|
||||
Info,
|
||||
}
|
||||
|
||||
enum class Type {
|
||||
@Json(name = "permanent")
|
||||
Permanent, // нельзя скрыть
|
||||
|
||||
@Json(name = "temporary")
|
||||
Temporary, // можно скрыть (кнопка ОК)
|
||||
|
||||
AppRating,
|
||||
|
||||
TestCard,
|
||||
}
|
||||
|
||||
enum class Location {
|
||||
|
||||
@Json(name = "send")
|
||||
SendScreen,
|
||||
}
|
||||
|
||||
enum class Origin {
|
||||
Remote,
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue