Reverted error handling of tab restoration

The change in #1048 prevented opening of blank tab and urls that are no longer valid. Now, we will need to open them as well, as we will need the exact number of tabs to reopen in order to correctly restore current tab index.
This commit is contained in:
ShaopengLin 2024-06-08 02:36:56 -04:00
parent 6ed46b0738
commit a179749d03

View File

@ -207,13 +207,7 @@ void KiwixApp::restoreTabs()
{
for (const auto &zimUrl : tabsToOpen)
{
try
{
/* Throws exception if zim file cannot be found */
m_library.getArchive(QUrl(zimUrl).host().split('.')[0]);
openUrl(QUrl(zimUrl));
}
catch (std::exception &e) { /* Blank */ }
openUrl(QUrl(zimUrl));
}
}
}