temp workaround for boost/fav for pixelfed
This commit is contained in:
parent
dc101db6ef
commit
5b6b463b90
|
@ -155,7 +155,11 @@ export class ActionBarComponent implements OnInit, OnDestroy {
|
||||||
if (boostedStatus.pleroma) {
|
if (boostedStatus.pleroma) {
|
||||||
this.bootedStatePerAccountId[account.id] = boostedStatus.reblog !== null; //FIXME: when Pleroma will return the good status
|
this.bootedStatePerAccountId[account.id] = boostedStatus.reblog !== null; //FIXME: when Pleroma will return the good status
|
||||||
} else {
|
} else {
|
||||||
this.bootedStatePerAccountId[account.id] = boostedStatus.reblogged;
|
let reblogged = boostedStatus.reblogged; //FIXME: when pixelfed will return the good status
|
||||||
|
if(reblogged === null){
|
||||||
|
reblogged = !this.bootedStatePerAccountId[account.id];
|
||||||
|
}
|
||||||
|
this.bootedStatePerAccountId[account.id] = reblogged;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.checkIfBoosted();
|
this.checkIfBoosted();
|
||||||
|
@ -187,9 +191,12 @@ export class ActionBarComponent implements OnInit, OnDestroy {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.then((favoritedStatus: Status) => {
|
.then((favoritedStatus: Status) => {
|
||||||
this.favoriteStatePerAccountId[account.id] = favoritedStatus.favourited;
|
let favourited = favoritedStatus.favourited; //FIXME: when pixelfed will return the good status
|
||||||
|
if(favourited === null){
|
||||||
|
favourited = !this.favoriteStatePerAccountId[account.id];
|
||||||
|
}
|
||||||
|
this.favoriteStatePerAccountId[account.id] = favourited;
|
||||||
this.checkIfFavorited();
|
this.checkIfFavorited();
|
||||||
// this.isFavorited = !this.isFavorited;
|
|
||||||
})
|
})
|
||||||
.catch((err: HttpErrorResponse) => {
|
.catch((err: HttpErrorResponse) => {
|
||||||
this.notificationService.notifyHttpError(err, account);
|
this.notificationService.notifyHttpError(err, account);
|
||||||
|
|
Loading…
Reference in New Issue