bitsongofficial / wallet-mobile

1 stars 2 forks source link

Add Alert Error View #116

Open zheleznov163 opened 2 years ago

zheleznov163 commented 2 years ago

Add a global error notification. You need to decide how long the message will last. It's probably best to only display if there are errors in the open bottomsheet, and hide it when trying to collapse the bottomsheet.

Снимок экрана 2022-09-01 в 16 13 04
EnricoBarbieri1997 commented 2 years ago

I agree that it should close automatically when no bottom sheet is open. Furthermore we should provide a method that accepts the error text or an array of errors and automatically opens it when the array is not empty or the string is not empty and closes it otherwise.

EnricoBarbieri1997 commented 2 years ago

It's not a bad implementation but if the message is set while no modal is open (maybe an async request started and then the modal was closed by the user) the alert is going to show up anyway. Also the current closing animation feels strange, it fades and then blinks back to fully visible