mirror of
				https://github.com/samuelclay/NewsBlur.git
				synced 2025-11-01 09:09:51 +00:00 
			
		
		
		
	Fixing stats sub count on unsub feeds.
This commit is contained in:
		
							parent
							
								
									11dd035adc
								
							
						
					
					
						commit
						7e325afd9c
					
				
					 3 changed files with 5 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -59,7 +59,7 @@ def load_feed_info(request, feed_id):
 | 
			
		|||
            previous_recommendation = recommended_feed[0].created_date
 | 
			
		||||
    
 | 
			
		||||
    return {
 | 
			
		||||
        'subscriber_count': feed.num_subscribers,
 | 
			
		||||
        'num_subscribers': feed.num_subscribers,
 | 
			
		||||
        'tagline': feed.data.feed_tagline,
 | 
			
		||||
        'previous_recommendation': previous_recommendation
 | 
			
		||||
    }
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -161,12 +161,13 @@ def load_feed_statistics(request, feed_id):
 | 
			
		|||
    
 | 
			
		||||
    # Subscribers
 | 
			
		||||
    stats['subscriber_count'] = feed.num_subscribers
 | 
			
		||||
    stats['num_subscribers'] = feed.num_subscribers
 | 
			
		||||
    stats['stories_last_month'] = feed.stories_last_month
 | 
			
		||||
    stats['last_load_time'] = feed.last_load_time
 | 
			
		||||
    stats['premium_subscribers'] = feed.premium_subscribers
 | 
			
		||||
    stats['active_subscribers'] = feed.active_subscribers
 | 
			
		||||
    stats['active_premium_subscribers'] = feed.active_premium_subscribers
 | 
			
		||||
    
 | 
			
		||||
 | 
			
		||||
    # Classifier counts
 | 
			
		||||
    stats['classifier_counts'] = json.decode(feed.data.feed_classifier_counts)
 | 
			
		||||
    
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ _.extend(NEWSBLUR.ReaderStatistics.prototype, {
 | 
			
		|||
                $.make('img', { className: 'NB-modal-feed-image feed_favicon', src: $.favicon(this.feed) }),
 | 
			
		||||
                $.make('div', { className: 'NB-modal-feed-heading' }, [
 | 
			
		||||
                    $.make('span', { className: 'NB-modal-feed-title' }, this.feed.get('feed_title')),
 | 
			
		||||
                    $.make('span', { className: 'NB-modal-feed-subscribers' }, Inflector.pluralize(' subscriber', this.feed.get('num_subscribers'), true))
 | 
			
		||||
                    $.make('span', { className: 'NB-modal-feed-subscribers ' + (_.isUndefined(this.feed.get('num_subscribers')) && 'NB-hidden') }, Inflector.pluralize(' subscriber', this.feed.get('num_subscribers'), true))
 | 
			
		||||
                ])
 | 
			
		||||
            ]),
 | 
			
		||||
            $.make('div', { className: 'NB-modal-statistics-info' })
 | 
			
		||||
| 
						 | 
				
			
			@ -74,7 +74,7 @@ _.extend(NEWSBLUR.ReaderStatistics.prototype, {
 | 
			
		|||
        
 | 
			
		||||
        var $stats = this.make_stats(data);
 | 
			
		||||
        $('.NB-modal-statistics-info', this.$modal).replaceWith($stats);
 | 
			
		||||
        
 | 
			
		||||
        $(".NB-modal-feed-subscribers").removeClass('NB-hidden').text(Inflector.pluralize(' subscriber', data.num_subscribers, true));
 | 
			
		||||
        setTimeout(function() {
 | 
			
		||||
            self.make_charts(data);  
 | 
			
		||||
        }, this.first_load ? 200 : 50);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue