Updated on 2026-08-14

This commit is contained in:
Tangem 2018-12-07 12:19:48 +03:00
commit bdd27a5dfd
28 changed files with 390 additions and 193 deletions

View file

@ -3,14 +3,16 @@ package com.tangem.di
import android.app.Activity
import android.nfc.Tag
import android.os.Bundle
import com.tangem.Constant
import com.tangem.domain.wallet.CoinData
import com.tangem.domain.wallet.TangemContext
import com.tangem.tangemcard.data.TangemCard
import com.tangem.presentation.activity.EmptyWalletActivity
import com.tangem.presentation.activity.LoadedWalletActivity
import com.tangem.presentation.activity.MainActivity
import com.tangem.presentation.activity.VerifyCardActivity
import com.tangem.presentation.fragment.LoadedWallet
import com.tangem.tangemcard.data.TangemCard
import com.tangem.presentation.activity.*
class Navigator {
@ -18,8 +20,21 @@ class Navigator {
context.startActivity(MainActivity.callingIntent(context))
}
fun showLogo(context: Activity, autoHide: Boolean) {
context.startActivity(LogoActivity.callingIntent(context, autoHide))
}
fun showPinSave(context: Activity, hasPin2: Boolean) {
context.startActivity(PinSaveActivity.callingIntent(context, hasPin2))
}
fun showPinRequest(context: Activity, mode: String) {
context.startActivityForResult(PinRequestActivity.callingIntent(context, mode), Constant.REQUEST_CODE_ENTER_PIN_ACTIVITY)
}
fun showLoadedWallet(context: Activity, lastTag: Tag, ctx: TangemContext) {
context.startActivityForResult(LoadedWalletActivity.callingIntent(context, lastTag, ctx), MainActivity.REQUEST_CODE_SHOW_CARD_ACTIVITY)
context.startActivityForResult(LoadedWalletActivity.callingIntent(context, lastTag, ctx), Constant.REQUEST_CODE_SHOW_CARD_ACTIVITY)
}
fun showEmptyWallet(context: Activity, ctx: TangemContext) {
@ -27,19 +42,25 @@ class Navigator {
}
fun showVerifyCard(context: Activity, ctx: TangemContext) {
context.startActivityForResult(VerifyCardActivity.callingIntent(context, ctx), LoadedWallet.REQUEST_CODE_VERIFY_CARD)
context.startActivityForResult(VerifyCardActivity.callingIntent(context, ctx), Constant.REQUEST_CODE_VERIFY_CARD)
}
fun showPinSwap(context: Activity) {
fun showPinSwap(context: Activity, newPIN: String, newPIN2: String) {
context.startActivityForResult(PinSwapActivity.callingIntent(context, newPIN, newPIN2), Constant.REQUEST_CODE_SWAP_PIN)
fun showVerifyCard(context: Activity, ctx: TangemContext) {
context.startActivityForResult(VerifyCardActivity.callingIntent(context, ctx), Constant.REQUEST_CODE_VERIFY_CARD)
}
fun showPurge(context: Activity) {
}
// fun showPreparePayment(context: Activity) {
//
// }
//
// fun showCreateNewWallet(context: Activity) {
//
// }
fun showPreparePayment(context: Activity) {
}
fun showCreateNewWallet(context: Activity) {
}
}