Skip to content

Modal reopened with previous state after swipe dismissal #102

@pogadaikowork-max

Description

@pogadaikowork-max

I ran into an issue where I have, for example, a history screen with a list of transactions. When I tap a transaction, a modal screen opens.

If I open the first transaction (for example, +10 USDT), then dismiss the modal with a swipe down, and quickly open another transaction (for example, -99 USDT), the modal sometimes opens with the content of the first transaction (+10 USDT) instead.

What is strange is that when I tap an item in the history list, I am definitely passing the correct transaction ID, but the screen still opens with the wrong data.

I found a workaround by doing this:

case .historyTxDetails(let params):
HistoryTxDetailsScreen(params: params)
.id(params.txID) // TIP: fx sheet state restoration

This seems to fix the issue by forcing the modal screen to be recreated for a new transaction ID.

But is this the expected way it should work?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions