Search in sources :

Example 6 with PaymentsValues

use of org.thoughtcrime.securesms.keyvalue.PaymentsValues in project Signal-Android by signalapp.

the class InfoCard method getInfoCards.

@NonNull
public static List<InfoCard> getInfoCards() {
    List<InfoCard> infoCards = new ArrayList<>(Type.values().length);
    PaymentsValues paymentsValues = SignalStore.paymentsValues();
    if (paymentsValues.showRecoveryPhraseInfoCard()) {
        infoCards.add(new InfoCard(R.string.payment_info_card_record_recovery_phrase, R.string.payment_info_card_your_recovery_phrase_gives_you, R.string.payment_info_card_record_your_phrase, R.drawable.ic_payments_info_card_restore_80, Type.RECORD_RECOVERY_PHASE, paymentsValues::dismissRecoveryPhraseInfoCard));
    }
    if (paymentsValues.showUpdatePinInfoCard()) {
        infoCards.add(new InfoCard(R.string.payment_info_card_update_your_pin, R.string.payment_info_card_with_a_high_balance, R.string.payment_info_card_update_pin, R.drawable.ic_payments_info_card_pin_80, Type.UPDATE_YOUR_PIN, paymentsValues::dismissUpdatePinInfoCard));
    }
    if (paymentsValues.showAboutMobileCoinInfoCard()) {
        infoCards.add(new InfoCard(R.string.payment_info_card_about_mobilecoin, R.string.payment_info_card_mobilecoin_is_a_new_privacy_focused_digital_currency, R.string.LearnMoreTextView_learn_more, R.drawable.ic_about_mc_80, Type.ABOUT_MOBILECOIN, paymentsValues::dismissAboutMobileCoinInfoCard));
    }
    if (paymentsValues.showAddingToYourWalletInfoCard()) {
        infoCards.add(new InfoCard(R.string.payment_info_card_adding_funds, R.string.payment_info_card_you_can_add_funds_for_use_in, R.string.LearnMoreTextView_learn_more, R.drawable.ic_add_money_80, Type.ADDING_TO_YOUR_WALLET, paymentsValues::dismissAddingToYourWalletInfoCard));
    }
    if (paymentsValues.showCashingOutInfoCard()) {
        infoCards.add(new InfoCard(R.string.payment_info_card_cashing_out, R.string.payment_info_card_you_can_cash_out_mobilecoin, R.string.LearnMoreTextView_learn_more, R.drawable.ic_cash_out_80, Type.CASHING_OUT, paymentsValues::dismissCashingOutInfoCard));
    }
    return infoCards;
}
Also used : PaymentsValues(org.thoughtcrime.securesms.keyvalue.PaymentsValues) ArrayList(java.util.ArrayList) NonNull(androidx.annotation.NonNull)

Aggregations

PaymentsValues (org.thoughtcrime.securesms.keyvalue.PaymentsValues)6 NonNull (androidx.annotation.NonNull)4 WorkerThread (androidx.annotation.WorkerThread)2 NetworkException (com.mobilecoin.lib.exceptions.NetworkException)2 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 PaymentsAvailability (org.thoughtcrime.securesms.keyvalue.PaymentsAvailability)2