fixed
This commit is contained in:
parent
2401f9b958
commit
a0bd84d844
1 changed files with 12 additions and 4 deletions
|
@ -30,11 +30,15 @@ Favorite.onclick = (event) => {
|
||||||
if (Favoritable == false) {
|
if (Favoritable == false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Favoritee();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function Favoritee() {
|
||||||
Favoritable = false;
|
Favoritable = false;
|
||||||
if (website == "Mastodon") {
|
if (website == "Mastodon") {
|
||||||
MastodonAPI.CreateFavorite(post.id, post.favourited);
|
await MastodonAPI.CreateFavorite(post.id, post.favourited);
|
||||||
} else if (website == "Bluesky") {
|
} else if (website == "Bluesky") {
|
||||||
BlueskyAPI.CreateLike(localStorage.getItem(Variables.BlueskyDID), post.post.uri, post.post.cid);
|
await BlueskyAPI.CreateLike(localStorage.getItem(Variables.BlueskyDID), post.post.uri, post.post.cid);
|
||||||
}
|
}
|
||||||
SetFavorite();
|
SetFavorite();
|
||||||
}
|
}
|
||||||
|
@ -43,11 +47,15 @@ Boost.onclick = (event) => {
|
||||||
if (Boostable == false) {
|
if (Boostable == false) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Boostee();
|
||||||
|
}
|
||||||
|
|
||||||
|
async function Boostee() {
|
||||||
Boostable = false;
|
Boostable = false;
|
||||||
if (website == "Mastodon") {
|
if (website == "Mastodon") {
|
||||||
MastodonAPI.CreateReblog(post.id, post.reblogged);
|
await MastodonAPI.CreateReblog(post.id, post.reblogged);
|
||||||
} else if (website == "Bluesky") {
|
} else if (website == "Bluesky") {
|
||||||
BlueskyAPI.CreateRepost(localStorage.getItem(Variables.BlueskyDID), post.post.uri, post.post.cid);
|
await BlueskyAPI.CreateRepost(localStorage.getItem(Variables.BlueskyDID), post.post.uri, post.post.cid);
|
||||||
}
|
}
|
||||||
SetBoost();
|
SetBoost();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue