mirror of
https://github.com/bulwarkmail/native.git
synced 2026-11-01 08:06:13 +00:00
fix: show toasts on every screen, including the Unified Inbox and contacts
Only the tab screens and the viewer had a toast host, so a viewer action that failed after going back to the Unified Inbox or a contact (both stack screens of their own) raised a toast nobody saw. Every stack screen now gets a host through the navigator's `screenLayout`, and only the focused screen's host renders, so the screen kept live under the top one never shows the same toast a second time. The tab screens' and the viewer's own hosts are gone.
This commit is contained in:
@@ -9,9 +9,10 @@ import { useToastStore, type Toast } from '../stores/toast-store';
|
||||
import { useLocaleStore } from '../stores/locale-store';
|
||||
|
||||
/**
|
||||
* Renders the toast queue above the tab bar. One host is mounted in App.tsx;
|
||||
* the email undo snackbar keeps its own component because it is bound to
|
||||
* the email store's pending-undo entry.
|
||||
* Renders the toast queue above the tab bar. App.tsx gives every stack screen
|
||||
* one and only the focused screen's renders; the email undo snackbar keeps
|
||||
* its own component because it is bound to the email store's pending-undo
|
||||
* entry.
|
||||
*/
|
||||
export function ToastHost(): React.ReactElement | null {
|
||||
const toasts = useToastStore((s) => s.toasts);
|
||||
|
||||
Reference in New Issue
Block a user