[Client:Desktop] Fix bug
This commit is contained in:
parent
e6e63f0679
commit
17677e00f2
3 changed files with 13 additions and 15 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "misskey",
|
||||
"author": "syuilo <i@syuilo.com>",
|
||||
"version": "0.0.1475",
|
||||
"version": "0.0.1479",
|
||||
"license": "MIT",
|
||||
"description": "A miniblog-based SNS",
|
||||
"bugs": "https://github.com/syuilo/misskey/issues",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<mk-recommended-polls-home-widget>
|
||||
<p class="title"><i class="fa fa-pie-chart"></i>投票</p>
|
||||
<button onclick={ refresh } title="他を見る"><i class="fa fa-refresh"></i></button>
|
||||
<button onclick={ fetch } title="他を見る"><i class="fa fa-refresh"></i></button>
|
||||
<div class="poll" if={ !loading && poll != null }>
|
||||
<p class="text" if={ poll.text }>{ poll.text }</p>
|
||||
<mk-poll post={ poll }></mk-poll>
|
||||
|
@ -87,17 +87,16 @@
|
|||
offset: this.offset
|
||||
}).then(posts => {
|
||||
const poll = posts ? posts[0] : null;
|
||||
if (poll == null) this.offset = 0;
|
||||
if (post == null) {
|
||||
this.offset = 0;
|
||||
} else {
|
||||
this.offset++;
|
||||
}
|
||||
this.update({
|
||||
loading: false,
|
||||
poll: poll
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
this.refresh = () => {
|
||||
this.offset++;
|
||||
this.fetch();
|
||||
};
|
||||
</script>
|
||||
</mk-recommended-polls-home-widget>
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<mk-trends-home-widget>
|
||||
<p class="title"><i class="fa fa-fire"></i>トレンド</p>
|
||||
<button onclick={ refresh } title="他を見る"><i class="fa fa-refresh"></i></button>
|
||||
<button onclick={ fetch } title="他を見る"><i class="fa fa-refresh"></i></button>
|
||||
<div class="post" if={ !loading && post != null }>
|
||||
<p class="text">{ post.text }</p>
|
||||
<p class="author">―<a href="/{ post.user.username }">@{ post.user.username }</a></p>
|
||||
|
@ -96,17 +96,16 @@
|
|||
poll: false
|
||||
}).then(posts => {
|
||||
const post = posts ? posts[0] : null;
|
||||
if (post == null) this.offset = 0;
|
||||
if (post == null) {
|
||||
this.offset = 0;
|
||||
} else {
|
||||
this.offset++;
|
||||
}
|
||||
this.update({
|
||||
loading: false,
|
||||
post: post
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
this.refresh = () => {
|
||||
this.offset++;
|
||||
this.fetch();
|
||||
};
|
||||
</script>
|
||||
</mk-trends-home-widget>
|
||||
|
|
Loading…
Reference in a new issue