mirror of
https://github.com/kiwix/kiwix-desktop.git
synced 2025-09-24 04:32:15 -04:00
Merge pull request #569 from HanYoung-uwu/master
This commit is contained in:
commit
79366c01af
@ -14,6 +14,8 @@ void SuggestionListWorker::run()
|
||||
QVector<QUrl> urlList;
|
||||
|
||||
auto currentWidget = KiwixApp::instance()->getTabWidget()->currentWebView();
|
||||
if(!currentWidget)
|
||||
return;
|
||||
auto qurl = currentWidget->url();
|
||||
auto currentZimId = qurl.host().split(".")[0];
|
||||
auto reader = KiwixApp::instance()->getLibrary()->getReader(currentZimId);
|
||||
|
@ -25,7 +25,8 @@ public:
|
||||
ZimView* createNewTab(bool setCurrent);
|
||||
ZimView* widget(int index) { return (index != 0) ? static_cast<ZimView*>(mp_stackedWidget->widget(index)) : nullptr; }
|
||||
WebView* currentWebView() { auto current = mp_stackedWidget->currentWidget();
|
||||
if (mp_stackedWidget->currentIndex() == 0) return nullptr;
|
||||
if (mp_stackedWidget->currentIndex() == 0 ||
|
||||
mp_stackedWidget->currentIndex() == m_settingsIndex) return nullptr;
|
||||
return static_cast<ZimView*>(current)->getWebView();
|
||||
}
|
||||
ZimView* currentWidget() { auto current = mp_stackedWidget->currentWidget();
|
||||
|
Loading…
x
Reference in New Issue
Block a user