Defer AppView wait behind a pending toast on post
Step 5 of sending a post (waiting for the AppView to index the new record) can take an unbounded amount of time, but the post is already created after step 4. Close the composer immediately after the record is written and show a pending toast while the AppView wait runs in the background. When it settles, swap the pending toast in place for the existing success toast. Adds a 'pending' ToastType that renders a spinner via the existing Loader, and a new Toast.promise() helper that drives the in-place swap on both sonner and sonner-native.
This commit is contained in:
@@ -539,11 +539,6 @@
|
||||
"count": 8
|
||||
}
|
||||
},
|
||||
"src/view/com/composer/Composer.tsx": {
|
||||
"@typescript-eslint/no-explicit-any": {
|
||||
"count": 2
|
||||
}
|
||||
},
|
||||
"src/view/com/composer/drafts/state/queries.ts": {
|
||||
"@typescript-eslint/no-explicit-any": {
|
||||
"count": 2
|
||||
|
||||
Reference in New Issue
Block a user