mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Adding confirmation when marking stories read in a direction and there are > 100 stories in the folder.
This commit is contained in:
parent
c8179ee33b
commit
8a91f0270d
1 changed files with 13 additions and 0 deletions
|
@ -2402,6 +2402,19 @@
|
|||
var folder = folder || this.active_folder;
|
||||
var feeds = folder.feed_ids_in_folder({unreads_only: true});
|
||||
|
||||
if (direction) {
|
||||
var order = NEWSBLUR.assets.view_setting(this.active_feed, 'order');
|
||||
if ((direction == "newer" && order == "oldest") || (direction == "older" && order == "newest")) {
|
||||
var unread_counts = folder.unread_counts && folder.unread_counts() || folder.folders.unread_counts();
|
||||
var total = unread_counts['nt'] + unread_counts['ps'];
|
||||
if (total > 100) {
|
||||
if (!window.confirm("This will mark up to " + Inflector.commas(total) + " stories as read. Are you sure?")) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this.mark_feeds_as_read(feeds, days_back, direction);
|
||||
|
||||
if (!direction && NEWSBLUR.assets.preference('markread_nextfeed') == 'nextfeed' &&
|
||||
|
|
Loading…
Add table
Reference in a new issue