mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-02-05 05:17:51 +08:00
fixed quote rating api call triggering in all modes
This commit is contained in:
parent
2587326e82
commit
ce0d7e1bac
1 changed files with 14 additions and 12 deletions
|
@ -1589,18 +1589,20 @@ export async function finish(difficultyFailed = false) {
|
|||
) {
|
||||
if (firebase.auth().currentUser != null) {
|
||||
completedEvent.uid = firebase.auth().currentUser.uid;
|
||||
$(".pageTest #result #rateQuoteButton .rating").text("");
|
||||
RateQuotePopup.getQuoteStats(randomQuote).then((quoteStats) => {
|
||||
if (quoteStats !== null) {
|
||||
$(".pageTest #result #rateQuoteButton .rating").text(
|
||||
quoteStats.average
|
||||
);
|
||||
}
|
||||
$(".pageTest #result #rateQuoteButton")
|
||||
.css({ opacity: 0 })
|
||||
.removeClass("hidden")
|
||||
.css({ opacity: 1 });
|
||||
});
|
||||
if (Config.mode === "quote") {
|
||||
$(".pageTest #result #rateQuoteButton .rating").text("");
|
||||
RateQuotePopup.getQuoteStats(randomQuote).then((quoteStats) => {
|
||||
if (quoteStats !== null) {
|
||||
$(".pageTest #result #rateQuoteButton .rating").text(
|
||||
quoteStats.average
|
||||
);
|
||||
}
|
||||
$(".pageTest #result #rateQuoteButton")
|
||||
.css({ opacity: 0 })
|
||||
.removeClass("hidden")
|
||||
.css({ opacity: 1 });
|
||||
});
|
||||
}
|
||||
|
||||
//check local pb
|
||||
AccountButton.loading(true);
|
||||
|
|
Loading…
Reference in a new issue