Delay showing "status posted" toast
This commit is contained in:
parent
44617cffca
commit
02c464a139
1 changed files with 14 additions and 12 deletions
26
src/app.jsx
26
src/app.jsx
|
@ -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);
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
Loading…
Add table
Reference in a new issue