Skip to content

Commit

Permalink
fix: auto audio pronunciation does not work properly
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoyifang committed Jan 21, 2024
1 parent a06a372 commit 97e4956
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/ui/mainwindow.cc
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,16 @@ MainWindow::MainWindow( Config::Class & cfg_ ):
[ this ]( auto audioUrl ) {
auto view = getCurrentArticleView();
if ( ( cfg.preferences.pronounceOnLoadMain || cfg.preferences.pronounceOnLoadPopup ) && view != nullptr ) {
view->openLink( QUrl::fromEncoded( audioUrl.toUtf8() ), {} );
if ( cfg.preferences.pronounceOnLoadPopup ) {
if ( !scanPopup || !scanPopup->isActiveWindow() )
return;
view->openLink( QUrl::fromEncoded( audioUrl.toUtf8() ), {} );
}
else if ( cfg.preferences.pronounceOnLoadMain ) {
if ( scanPopup && scanPopup->isActiveWindow() )
return;
view->openLink( QUrl::fromEncoded( audioUrl.toUtf8() ), {} );
}
}
} );
applyProxySettings();
Expand Down

0 comments on commit 97e4956

Please sign in to comment.