Flipping the switch: More than 64 sites, even added individually, now trigger the premium upgrade dialog.

This commit is contained in:
Samuel Clay 2012-12-10 16:25:21 -08:00
parent 4302f102e8
commit 6ac7878bb5
2 changed files with 11 additions and 2 deletions

View file

@ -159,6 +159,10 @@ NEWSBLUR.Collections.Feeds = Backbone.Collection.extend({
return this.detect(function(feed) { return feed.get('selected'); });
},
active: function() {
return this.select(function(feed) { return feed.get('active'); });
},
has_chosen_feeds: function() {
return this.any(function(feed) {
return feed.get('active');

View file

@ -887,7 +887,8 @@
options = options || {};
if (!NEWSBLUR.Globals.is_authenticated) return;
if (!NEWSBLUR.assets.folders.length || !NEWSBLUR.assets.preference('has_setup_feeds')) {
if (!NEWSBLUR.assets.folders.length ||
!NEWSBLUR.assets.preference('has_setup_feeds')) {
if (options.delayed_import || this.flags.delayed_import) {
this.setup_ftux_add_feed_callout("Check your email...");
} else if (NEWSBLUR.assets.preference('has_setup_feeds')) {
@ -895,7 +896,11 @@
} else if (!NEWSBLUR.intro || !NEWSBLUR.intro.flags.open) {
_.defer(_.bind(this.open_intro_modal, this), 100);
}
} else if (!NEWSBLUR.assets.flags['has_chosen_feeds'] && NEWSBLUR.assets.folders.length) {
} else if (!NEWSBLUR.assets.flags['has_chosen_feeds'] &&
NEWSBLUR.assets.folders.length) {
_.defer(_.bind(this.open_feedchooser_modal, this), 100);
} else if (!NEWSBLUR.Globals.is_premium &&
NEWSBLUR.assets.feeds.active().length > 64) {
_.defer(_.bind(this.open_feedchooser_modal, this), 100);
}
},