Updated on 2026-08-14

This commit is contained in:
Tangem 2024-04-18 11:59:41 +05:00
parent ad96d7ce1a
commit dbedf097b9
2 changed files with 3 additions and 3 deletions

View file

@ -70,7 +70,7 @@ internal class SendNotificationFactory(
}.toImmutableList()
}
fun dismissNotificationState(clazz: Class<out SendNotification>): SendUiState {
fun dismissNotificationState(clazz: Class<out SendNotification>, isIgnored: Boolean = false): SendUiState {
val state = currentStateProvider()
val sendState = state.sendState ?: return state
val notificationsToRemove = sendState.notifications.filterIsInstance(clazz)
@ -78,7 +78,7 @@ internal class SendNotificationFactory(
updatedNotifications.removeAll(notificationsToRemove)
return state.copy(
sendState = sendState.copy(
ignoreAmountReduce = true,
ignoreAmountReduce = isIgnored,
notifications = updatedNotifications.toImmutableList(),
),
)

View file

@ -795,7 +795,7 @@ internal class SendViewModel @Inject constructor(
}
override fun onNotificationCancel(clazz: Class<out SendNotification>) {
uiState = sendNotificationFactory.dismissNotificationState(clazz)
uiState = sendNotificationFactory.dismissNotificationState(clazz = clazz, isIgnored = true)
}
private fun verifyAndSendTransaction() {