quickMenuGo: try/catch block
This commit is contained in:
parent
8a414837ec
commit
bb3423cf99
1 changed files with 48 additions and 46 deletions
78
tt-rss.js
78
tt-rss.js
|
@ -487,56 +487,58 @@ function quickMenuChange() {
|
|||
}
|
||||
|
||||
function quickMenuGo(opid) {
|
||||
try {
|
||||
|
||||
if (opid == "qmcPrefs") {
|
||||
gotoPreferences();
|
||||
}
|
||||
|
||||
if (opid == "qmcPrefs") {
|
||||
gotoPreferences();
|
||||
}
|
||||
|
||||
if (opid == "qmcSearch") {
|
||||
displayDlg("search", getActiveFeedId());
|
||||
return;
|
||||
}
|
||||
|
||||
if (opid == "qmcAddFeed") {
|
||||
displayDlg("quickAddFeed");
|
||||
return;
|
||||
}
|
||||
|
||||
if (opid == "qmcRemoveFeed") {
|
||||
var actid = getActiveFeedId();
|
||||
|
||||
if (!actid) {
|
||||
notify("Please select some feed first.");
|
||||
if (opid == "qmcSearch") {
|
||||
displayDlg("search", getActiveFeedId());
|
||||
return;
|
||||
}
|
||||
|
||||
if (confirm("Remove current feed?")) {
|
||||
qfdDelete(actid);
|
||||
if (opid == "qmcAddFeed") {
|
||||
displayDlg("quickAddFeed");
|
||||
return;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
if (opid == "qmcRemoveFeed") {
|
||||
var actid = getActiveFeedId();
|
||||
|
||||
if (opid == "qmcUpdateFeeds") {
|
||||
scheduleFeedUpdate(true);
|
||||
return;
|
||||
}
|
||||
if (!actid) {
|
||||
notify("Please select some feed first.");
|
||||
return;
|
||||
}
|
||||
|
||||
if (opid == "qmcCatchupAll") {
|
||||
catchupAllFeeds();
|
||||
return;
|
||||
}
|
||||
if (confirm("Remove current feed?")) {
|
||||
qfdDelete(actid);
|
||||
}
|
||||
|
||||
if (opid == "qmcShowOnlyUnread") {
|
||||
toggleDispRead();
|
||||
return;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if (opid == "qmcAddFilter") {
|
||||
displayDlg("quickAddFilter", getActiveFeedId());
|
||||
}
|
||||
if (opid == "qmcUpdateFeeds") {
|
||||
scheduleFeedUpdate(true);
|
||||
return;
|
||||
}
|
||||
|
||||
if (opid == "qmcCatchupAll") {
|
||||
catchupAllFeeds();
|
||||
return;
|
||||
}
|
||||
|
||||
if (opid == "qmcShowOnlyUnread") {
|
||||
toggleDispRead();
|
||||
return;
|
||||
}
|
||||
|
||||
if (opid == "qmcAddFilter") {
|
||||
displayDlg("quickAddFilter", getActiveFeedId());
|
||||
}
|
||||
} catch (e) {
|
||||
exception_error("quickMenuGo", e);
|
||||
}
|
||||
}
|
||||
|
||||
function qafAdd() {
|
||||
|
|
Loading…
Reference in a new issue