mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Everybody gets unread count in title.
This commit is contained in:
parent
aefd8de78c
commit
a39cbfb814
3 changed files with 18 additions and 38 deletions
|
@ -3547,6 +3547,7 @@
|
||||||
}
|
}
|
||||||
this.show_story_titles_above_intelligence_level({'animate': true, 'follow': true});
|
this.show_story_titles_above_intelligence_level({'animate': true, 'follow': true});
|
||||||
NEWSBLUR.app.sidebar_header.toggle_hide_read_preference();
|
NEWSBLUR.app.sidebar_header.toggle_hide_read_preference();
|
||||||
|
NEWSBLUR.app.sidebar_header.count();
|
||||||
NEWSBLUR.assets.folders.update_all_folder_visibility();
|
NEWSBLUR.assets.folders.update_all_folder_visibility();
|
||||||
NEWSBLUR.app.feed_list.scroll_to_show_selected_feed();
|
NEWSBLUR.app.feed_list.scroll_to_show_selected_feed();
|
||||||
NEWSBLUR.app.feed_list.scroll_to_show_selected_folder();
|
NEWSBLUR.app.feed_list.scroll_to_show_selected_folder();
|
||||||
|
|
|
@ -271,19 +271,6 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
||||||
'Site sidebar order'
|
'Site sidebar order'
|
||||||
])
|
])
|
||||||
]),
|
]),
|
||||||
$.make('div', { className: 'NB-preference NB-preference-showunreadcountsintitle' }, [
|
|
||||||
$.make('div', { className: 'NB-preference-options' }, [
|
|
||||||
$.make('div', [
|
|
||||||
$.make('input', { id: 'NB-preference-showunreadcountsintitle-1', type: 'checkbox', name: 'show_unread_counts_in_title', value: 0 }),
|
|
||||||
$.make('label', { 'for': 'NB-preference-showunreadcountsintitle-1' }, [
|
|
||||||
'Show unread counts in the window title'
|
|
||||||
])
|
|
||||||
])
|
|
||||||
]),
|
|
||||||
$.make('div', { className: 'NB-preference-label'}, [
|
|
||||||
'Window title'
|
|
||||||
])
|
|
||||||
]),
|
|
||||||
$.make('div', { className: 'NB-preference NB-preference-ssl' }, [
|
$.make('div', { className: 'NB-preference NB-preference-ssl' }, [
|
||||||
$.make('div', { className: 'NB-preference-options' }, [
|
$.make('div', { className: 'NB-preference-options' }, [
|
||||||
$.make('div', [
|
$.make('div', [
|
||||||
|
@ -634,12 +621,6 @@ _.extend(NEWSBLUR.ReaderPreferences.prototype, {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('input[name=show_unread_counts_in_title]', $modal).each(function() {
|
|
||||||
if (NEWSBLUR.Preferences.show_unread_counts_in_title) {
|
|
||||||
$(this).attr('checked', true);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
});
|
|
||||||
$('input[name=open_feed_action]', $modal).each(function() {
|
$('input[name=open_feed_action]', $modal).each(function() {
|
||||||
if ($(this).val() == NEWSBLUR.Preferences.open_feed_action) {
|
if ($(this).val() == NEWSBLUR.Preferences.open_feed_action) {
|
||||||
$(this).attr('checked', true);
|
$(this).attr('checked', true);
|
||||||
|
|
|
@ -61,12 +61,11 @@ NEWSBLUR.Views.SidebarHeader = Backbone.View.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
count: function() {
|
count: function() {
|
||||||
// this.unread_counts = this.count_unreads_across_all_sites();
|
|
||||||
this.unread_counts = NEWSBLUR.assets.folders.unread_counts();
|
this.unread_counts = NEWSBLUR.assets.folders.unread_counts();
|
||||||
this.feeds_count = this.count_feeds();
|
this.feeds_count = this.count_feeds();
|
||||||
|
|
||||||
if (NEWSBLUR.assets.preference('show_unread_counts_in_title')) {
|
if (!NEWSBLUR.Globals.is_authenticated) return;
|
||||||
var title = '(';
|
|
||||||
var counts = [];
|
var counts = [];
|
||||||
var unread_view = _.isNumber(this.options.unread_view) && this.options.unread_view || NEWSBLUR.assets.preference('unread_view');
|
var unread_view = _.isNumber(this.options.unread_view) && this.options.unread_view || NEWSBLUR.assets.preference('unread_view');
|
||||||
if (unread_view <= -1) {
|
if (unread_view <= -1) {
|
||||||
|
@ -81,9 +80,8 @@ NEWSBLUR.Views.SidebarHeader = Backbone.View.extend({
|
||||||
if (!this.unread_counts['ng'] && !this.unread_counts['ps']) {
|
if (!this.unread_counts['ng'] && !this.unread_counts['ps']) {
|
||||||
counts = [this.unread_counts['nt']];
|
counts = [this.unread_counts['nt']];
|
||||||
}
|
}
|
||||||
title += counts.join('/') + ') NewsBlur';
|
var title = '(' + counts.join('/') + ') NewsBlur';
|
||||||
document.title = title;
|
document.title = title;
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
count_unreads_across_all_sites: function() {
|
count_unreads_across_all_sites: function() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue