Updated on 2026-08-14

This commit is contained in:
Tangem 2023-09-26 00:36:00 +04:00
parent d1c77b00cf
commit 7805d46f92
48 changed files with 279 additions and 260 deletions

View file

@ -14,4 +14,6 @@ internal object MutableAppThemeModeHolder : AppThemeModeHolder {
appThemeMode.value = value
}
get() = appThemeMode.value
var isDarkThemeActive: Boolean = false
}

View file

@ -7,6 +7,7 @@ import com.tangem.blockchain.common.WalletManager
import com.tangem.common.services.Result
import com.tangem.domain.common.extensions.amountToCreateAccount
import com.tangem.tap.common.TestActions
import com.tangem.tap.common.apptheme.MutableAppThemeModeHolder
import com.tangem.tap.domain.TapError
import com.tangem.tap.domain.getFirstToken
import com.tangem.tap.domain.model.WalletDataModel
@ -71,6 +72,7 @@ fun WalletManager.getTopUpUrl(): String? {
cryptoCurrencyName = wallet.blockchain.currency,
fiatCurrencyName = globalState.appCurrency.code,
walletAddress = defaultAddress,
isDarkTheme = MutableAppThemeModeHolder.isDarkThemeActive,
)
}

View file

@ -2,6 +2,7 @@ package com.tangem.tap.common.ui
import android.content.Context
import androidx.appcompat.app.AlertDialog
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import com.tangem.tap.common.redux.global.GlobalAction
import com.tangem.tap.store
import com.tangem.wallet.R
@ -39,7 +40,7 @@ object SimpleCancelableAlertDialog {
secondaryButtonAction: () -> Unit = {},
context: Context,
): AlertDialog {
return AlertDialog.Builder(context).apply {
return MaterialAlertDialogBuilder(context, R.style.CustomMaterialDialog).apply {
setTitle(titleRes?.let { context.getString(it) } ?: title)
setMessage(messageRes?.let { context.getString(it) } ?: message)
setPositiveButton(context.getText(primaryButtonRes)) { _, _ -> primaryButtonAction() }