not changing quote length until the user actually selects a quote. closes #2004

This commit is contained in:
Jack 2021-10-15 19:41:44 +01:00
parent e050b70e56
commit d53a05ea8e
2 changed files with 5 additions and 2 deletions

View file

@ -1,11 +1,12 @@
import * as Misc from "./misc";
import * as Notifications from "./notifications";
import Config from "./config";
import Config, * as UpdateConfig from "./config";
import * as ManualRestart from "./manual-restart-tracker";
import * as TestLogic from "./test-logic";
import * as QuoteSubmitPopup from "./quote-submit-popup";
import * as QuoteApprovePopup from "./quote-approve-popup";
import * as DB from "./db";
import * as TestUI from "./test-ui";
export let selectedId = 1;
@ -111,6 +112,7 @@ export function hide(noAnim = false) {
noAnim ? 0 : 100,
(e) => {
$("#quoteSearchPopupWrapper").addClass("hidden");
TestUI.focusWords();
}
);
}
@ -121,6 +123,7 @@ function apply(val) {
val = document.getElementById("searchBox").value;
}
if (val !== null && !isNaN(val) && val >= 0) {
UpdateConfig.setQuoteLength(-2, false);
selectedId = val;
ManualRestart.set();
TestLogic.restart();

View file

@ -67,7 +67,7 @@ $(document).on("click", "#top .config .time .text-button", (e) => {
$(document).on("click", "#top .config .quoteLength .text-button", (e) => {
let len = $(e.currentTarget).attr("quoteLength");
if (len == -2) {
UpdateConfig.setQuoteLength(-2, false, e.shiftKey);
// UpdateConfig.setQuoteLength(-2, false, e.shiftKey);
QuoteSearchPopup.show();
} else {
if (len == -1) {