Skip to content

Commit 58cc4a7

Browse files
committed
Store WebUI search tabs between app restarts
This was inspired by the GUI version implemented in e644a91.
1 parent bd9857b commit 58cc4a7

File tree

4 files changed

+386
-9
lines changed

4 files changed

+386
-9
lines changed

src/webui/api/appcontroller.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,9 @@ void AppController::preferencesAction()
156156
data[u"status_bar_external_ip"_s] = pref->isStatusbarExternalIPDisplayed();
157157
// Transfer List
158158
data[u"confirm_torrent_deletion"_s] = pref->confirmTorrentDeletion();
159+
// Search
160+
data[u"store_search_jobs"_s] = pref->storeSearchJobs();
161+
data[u"store_search_job_results"_s] = pref->storeSearchJobResults();
159162
// Log file
160163
data[u"file_log_enabled"_s] = app()->isFileLoggerEnabled();
161164
data[u"file_log_path"_s] = app()->fileLoggerPath().toString();
@@ -553,6 +556,11 @@ void AppController::setPreferencesAction()
553556
// Transfer List
554557
if (hasKey(u"confirm_torrent_deletion"_s))
555558
pref->setConfirmTorrentDeletion(it.value().toBool());
559+
// Search
560+
if (hasKey(u"store_search_jobs"_s))
561+
pref->setStoreSearchJobs(it.value().toBool());
562+
if (hasKey(u"store_search_job_results"_s))
563+
pref->setStoreSearchJobResults(it.value().toBool());
556564
// Log file
557565
if (hasKey(u"file_log_enabled"_s))
558566
app()->setFileLoggerEnabled(it.value().toBool());

0 commit comments

Comments
 (0)