Delay showing "status posted" toast

pull/38/head
Lim Chee Aun 2022-12-28 18:05:22 +08:00
rodzic 44617cffca
commit 02c464a139
1 zmienionych plików z 14 dodań i 12 usunięć

Wyświetl plik

@ -384,18 +384,20 @@ export function App() {
states.showCompose = false; states.showCompose = false;
if (newStatus) { if (newStatus) {
states.reloadStatusPage++; states.reloadStatusPage++;
const toast = Toastify({ setTimeout(() => {
text: 'Status posted. Check it out.', const toast = Toastify({
duration: 10_000, // 10 seconds text: 'Status posted. Check it out.',
gravity: 'bottom', duration: 10_000, // 10 seconds
position: 'center', gravity: 'bottom',
// destination: `/#/s/${newStatus.id}`, position: 'center',
onClick: () => { // destination: `/#/s/${newStatus.id}`,
toast.hideToast(); onClick: () => {
route(`/s/${newStatus.id}`); toast.hideToast();
}, route(`/s/${newStatus.id}`);
}); },
toast.showToast(); });
toast.showToast();
}, 1000);
} }
}} }}
/> />