mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-02-02 14:16:39 +01:00
Different copy for toast when replying or editing
This commit is contained in:
parent
0f5edef199
commit
fd1b45900d
2 changed files with 8 additions and 2 deletions
|
@ -839,6 +839,8 @@ function Compose({
|
|||
|
||||
// Close
|
||||
onClose({
|
||||
// type: post, reply, edit
|
||||
type: editStatus ? 'edit' : replyToStatus ? 'reply' : 'post',
|
||||
newStatus,
|
||||
instance,
|
||||
});
|
||||
|
|
|
@ -50,13 +50,17 @@ export default function Modals() {
|
|||
null
|
||||
}
|
||||
onClose={(results) => {
|
||||
const { newStatus, instance } = results || {};
|
||||
const { newStatus, instance, type } = results || {};
|
||||
states.showCompose = false;
|
||||
window.__COMPOSE__ = null;
|
||||
if (newStatus) {
|
||||
states.reloadStatusPage++;
|
||||
showToast({
|
||||
text: 'Post published. Check it out.',
|
||||
text: {
|
||||
post: 'Post published. Check it out.',
|
||||
reply: 'Reply posted. Check it out.',
|
||||
edit: 'Post updated. Check it out.',
|
||||
}[type || 'post'],
|
||||
delay: 1000,
|
||||
duration: 10_000, // 10 seconds
|
||||
onClick: (toast) => {
|
||||
|
|
Loading…
Reference in a new issue