Fix bug
This commit is contained in:
parent
6cc6e0e6f2
commit
84c4c1d9f6
|
@ -4,8 +4,8 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="main" if={ !fetching }>
|
<div class="main" if={ !fetching }>
|
||||||
<button class="read-more" if={ p.reply_to && p.reply_to.reply_to_id && context == null } onclick={ loadContext } disabled={ loadingContext }>
|
<button class="read-more" if={ p.reply_to && p.reply_to.reply_to_id && context == null } onclick={ loadContext } disabled={ loadingContext }>
|
||||||
<i class="fa fa-ellipsis-v" if={ !loadingContext }></i>
|
<i class="fa fa-ellipsis-v" if={ !contextFetching }></i>
|
||||||
<i class="fa fa-spinner fa-pulse" if={ loadingContext }></i>
|
<i class="fa fa-spinner fa-pulse" if={ contextFetching }></i>
|
||||||
</button>
|
</button>
|
||||||
<div class="context">
|
<div class="context">
|
||||||
<virtual each={ post in context }>
|
<virtual each={ post in context }>
|
||||||
|
@ -441,14 +441,14 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
this.loadContext = () => {
|
this.loadContext = () => {
|
||||||
this.loadingContext = true;
|
this.contextFetching = true;
|
||||||
|
|
||||||
// Fetch context
|
// Fetch context
|
||||||
this.api('posts/context', {
|
this.api('posts/context', {
|
||||||
post_id: this.p.reply_to_id
|
post_id: this.p.reply_to_id
|
||||||
}).then(context => {
|
}).then(context => {
|
||||||
this.update({
|
this.update({
|
||||||
loadContext: false,
|
contextFetching: false,
|
||||||
context: context.reverse()
|
context: context.reverse()
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue