mirror of
https://iceshrimp.dev/limepotato/jormungandr-bite.git
synced 2024-11-14 22:17:30 -07:00
Fix bug
This commit is contained in:
parent
cf181d2049
commit
1828453e30
1 changed files with 4 additions and 4 deletions
|
@ -4,8 +4,8 @@
|
|||
</div>
|
||||
<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 }>
|
||||
<i class="fa fa-ellipsis-v" if={ !loadingContext }></i>
|
||||
<i class="fa fa-spinner fa-pulse" if={ loadingContext }></i>
|
||||
<i class="fa fa-ellipsis-v" if={ !contextFetching }></i>
|
||||
<i class="fa fa-spinner fa-pulse" if={ contextFetching }></i>
|
||||
</button>
|
||||
<div class="context">
|
||||
<virtual each={ post in context }>
|
||||
|
@ -441,14 +441,14 @@
|
|||
};
|
||||
|
||||
this.loadContext = () => {
|
||||
this.loadingContext = true;
|
||||
this.contextFetching = true;
|
||||
|
||||
// Fetch context
|
||||
this.api('posts/context', {
|
||||
post_id: this.p.reply_to_id
|
||||
}).then(context => {
|
||||
this.update({
|
||||
loadContext: false,
|
||||
contextFetching: false,
|
||||
context: context.reverse()
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue