接收提现结果 - 显示dialog
This commit is contained in:
parent
82d7f7d9d8
commit
2859edcc89
|
|
@ -230,15 +230,14 @@ class WithDrawActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
|
|||
|
||||
private fun showTransactionResultDialog(record: RecordCash) {
|
||||
if (!record.hasShowResultDialog && record.withdrawState != TRANSACTION_STATE_ONGOING) {
|
||||
WithdrawManager.instance().updateRecordHasNotifyState(record.payOutReplyNo)
|
||||
when (record.withdrawState) {
|
||||
TRANSACTION_STATE_SUCCESS -> {
|
||||
showSuccessDialog(record.amountNum)
|
||||
WithdrawManager.instance().updateRecordHasNotifyState(record.payOutReplyNo)
|
||||
}
|
||||
|
||||
TRANSACTION_STATE_FAIL -> {
|
||||
showFailDialog(WithdrawManager.instance().getFailHintStrRes(record.withdrawFailType))
|
||||
WithdrawManager.instance().updateRecordHasNotifyState(record.payOutReplyNo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -149,9 +149,9 @@ class WithDrawSubActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
|
|||
VididinEvents.EVENT_WITHDRAW_RESULT_UPDATED -> {
|
||||
try {
|
||||
val record = data.mData as RecordCash
|
||||
if (record.withdrawItemIndex > 0) {
|
||||
showTransactionResultDialog(record)
|
||||
}
|
||||
if (record.withdrawItemIndex > 0) {
|
||||
showTransactionResultDialog(record)
|
||||
}
|
||||
} catch (e: Exception) {
|
||||
e.printStackTrace()
|
||||
}
|
||||
|
|
@ -173,15 +173,14 @@ class WithDrawSubActivity : AppViewsEmptyViewModelActivity<ViewBinding>() {
|
|||
|
||||
private fun showTransactionResultDialog(record: RecordCash) {
|
||||
if (!record.hasShowResultDialog && record.withdrawState != TRANSACTION_STATE_ONGOING) {
|
||||
WithdrawManager.instance().updateRecordHasNotifyState(record.payOutReplyNo)
|
||||
when (record.withdrawState) {
|
||||
TRANSACTION_STATE_SUCCESS -> {
|
||||
showSuccessDialog(record.amountNum)
|
||||
WithdrawManager.instance().updateRecordHasNotifyState(record.payOutReplyNo)
|
||||
}
|
||||
|
||||
TRANSACTION_STATE_FAIL -> {
|
||||
showFailDialog(WithdrawManager.instance().getFailHintStrRes(record.withdrawFailType))
|
||||
WithdrawManager.instance().updateRecordHasNotifyState(record.payOutReplyNo)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -179,7 +179,7 @@ class WithdrawManager private constructor() {
|
|||
NotifyMan.instance().sendEvent(VididinEvents.EVENT_WITHDRAW_ITEM_LIST_CHANGED, null)
|
||||
}
|
||||
|
||||
private fun notifyWithdrawResult2(withdrawRecord: RecordCash) {
|
||||
private fun notifyWithdrawResult(withdrawRecord: RecordCash) {
|
||||
NotifyMan.instance().sendEvent(VididinEvents.EVENT_WITHDRAW_RESULT_UPDATED, NotifyMan.NotifyData(withdrawRecord))
|
||||
}
|
||||
|
||||
|
|
@ -617,7 +617,7 @@ class WithdrawManager private constructor() {
|
|||
RecordsManager.instance().updateCashRecord(withdrawRecord)
|
||||
|
||||
// 2. 事件通知以便更新UI
|
||||
notifyWithdrawResult2(withdrawRecord)
|
||||
notifyWithdrawResult(withdrawRecord)
|
||||
|
||||
// 3. Statistics
|
||||
StatisticUtil.reportEvents(StatisticUtil.KEY_Withdrawal_Reason, mapOf(
|
||||
|
|
@ -642,7 +642,7 @@ class WithdrawManager private constructor() {
|
|||
}
|
||||
|
||||
// 3. event 通知
|
||||
notifyWithdrawResult2(withdrawRecord)
|
||||
notifyWithdrawResult(withdrawRecord)
|
||||
|
||||
// 4. Statistic
|
||||
StatisticUtil.reportEvents(StatisticUtil.KEY_Withdrawal_Reason,
|
||||
|
|
|
|||
Loading…
Reference in New Issue