1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-11 07:18:08 +00:00

Default WebUI search tab to enabled

Search plugins and categories are now retrieved when the Search tab is first switched to. This prevents possible unnecessary instantiation of the SearchPluginManager.
This commit is contained in:
Thomas Piccirello 2019-07-22 23:24:58 -07:00
parent f121e67aba
commit 35ebd9a095
2 changed files with 7 additions and 3 deletions

View File

@ -44,6 +44,7 @@ let alternativeSpeedLimits = false;
let queueing_enabled = true; let queueing_enabled = true;
let serverSyncMainDataInterval = 1500; let serverSyncMainDataInterval = 1500;
let customSyncMainDataInterval = null; let customSyncMainDataInterval = null;
let searchTabInitialized = false;
let clipboardEvent; let clipboardEvent;
@ -254,7 +255,7 @@ window.addEvent('load', function() {
$('speedInBrowserTitleBarLink').firstChild.style.opacity = '0'; $('speedInBrowserTitleBarLink').firstChild.style.opacity = '0';
// After showing/hiding the toolbar + status bar // After showing/hiding the toolbar + status bar
let showSearchEngine = localStorage.getItem('show_search_engine') === "true"; let showSearchEngine = localStorage.getItem('show_search_engine') !== "false";
if (!showSearchEngine) { if (!showSearchEngine) {
// uncheck menu option // uncheck menu option
$('showSearchEngineLink').firstChild.style.opacity = '0'; $('showSearchEngineLink').firstChild.style.opacity = '0';
@ -788,6 +789,11 @@ window.addEvent('load', function() {
}; };
const showSearchTab = function() { const showSearchTab = function() {
if (!searchTabInitialized) {
initSearchTab();
searchTabInitialized = true;
}
$("searchTabColumn").removeClass("invisible"); $("searchTabColumn").removeClass("invisible");
customSyncMainDataInterval = 30000; customSyncMainDataInterval = 30000;
hideTransfersTab(); hideTransfersTab();

View File

@ -639,6 +639,4 @@
clearTimeout(loadSearchResultsTimer); clearTimeout(loadSearchResultsTimer);
loadSearchResultsTimer = loadSearchResultsData.delay(500); loadSearchResultsTimer = loadSearchResultsData.delay(500);
}; };
initSearchTab();
</script> </script>