Add adr for fix error no active Service Worker of firebase on web

This commit is contained in:
dab246
2024-04-02 02:32:00 +07:00
committed by Dat H. Pham
parent b62588b163
commit abd2b56088
3 changed files with 26 additions and 3 deletions
@@ -0,0 +1,28 @@
# 40. Handle multiple attachment actions
Date: 2024-02-28
## Status
Accepted
## Context
- Attachment can be tapped even if its previous action (download/view) is still handling
- When user tap one attachment multiple times, race condition can happen
## Decision
1. When an attachment is prepared to download/view:
- Tapping function of that attachment will be disabled
- The attachment icon in front of the attachment name will be replaced by a loading UI
2. When an attachment is downloaded/viewed:
- Tapping function of that attachment will be enabled
- The attachment icon in front of the attachment name will be returned
## Consequences
- The attachment button on Twake Mail will now only be tapped once per handling, improving performance & prevent multiple actions by mistake