mirror of
https://git.joinsharkey.org/Sharkey/Sharkey.git
synced 2024-11-23 18:53:08 +02:00
wipo #259
This commit is contained in:
parent
9d0cafa763
commit
40ddb9c417
1 changed files with 4 additions and 1 deletions
|
@ -338,6 +338,7 @@
|
|||
if (draft) {
|
||||
draft = JSON.parse(draft);
|
||||
this.refs.text.value = draft.text;
|
||||
this.update();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -352,6 +353,7 @@
|
|||
this.clear = () => {
|
||||
this.refs.text.value = '';
|
||||
this.files = [];
|
||||
this.poll = false;
|
||||
this.trigger('change-files');
|
||||
this.update();
|
||||
};
|
||||
|
@ -452,8 +454,9 @@
|
|||
reply_to_id: this.inReplyToPost ? this.inReplyToPost.id : undefined,
|
||||
poll: this.poll ? this.refs.poll.get() : undefined
|
||||
}).then(data => {
|
||||
localStorage.removeItem('post-draft');
|
||||
this.clear();
|
||||
this.trigger('post');
|
||||
localStorage.removeItem('post-draft');
|
||||
this.notify(this.inReplyToPost ? '返信しました!' : '投稿しました!');
|
||||
}).catch(err => {
|
||||
this.notify('投稿できませんでした');
|
||||
|
|
Loading…
Reference in a new issue