Skip to content

Commit

Permalink
Use standard API to hide spinner
Browse files Browse the repository at this point in the history
  • Loading branch information
Jaifroid committed Sep 15, 2023
1 parent f30217b commit 3eaa44f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion www/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2152,10 +2152,11 @@ function pushBrowserHistoryState (title, titleSearch) {
* @param {String} contentType The mimetype of the downloadable file, if known
*/
function goToArticle (path, download, contentType) {
uiUtil.spinnerDisplay(true);
selectedArchive.getDirEntryByPath(path).then(function (dirEntry) {
var mimetype = contentType || dirEntry ? dirEntry.getMimetype() : '';
if (dirEntry === null || dirEntry === undefined) {
document.getElementById('searchingArticles').style.display = 'none';
uiUtil.spinnerDisplay(false);
uiUtil.systemAlert((translateUI.t('dialog-article-notfound-message') || 'Article with the following URL was not found in the archive:') + ' ' + path,
translateUI.t('dialog-article-notfound-title') || 'Error: article not found');
} else if (download || /\/(epub|pdf|zip|.*opendocument|.*officedocument|tiff|mp4|webm|mpeg|mp3|octet-stream)\b/i.test(mimetype)) {
Expand Down

0 comments on commit 3eaa44f

Please sign in to comment.