mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fixing issue with scrolling story titles.
This commit is contained in:
parent
3b9371bf05
commit
4e1bc928a8
3 changed files with 4 additions and 5 deletions
|
@ -119,7 +119,7 @@
|
|||
NEWSBLUR.app.sidebar = new NEWSBLUR.Views.Sidebar();
|
||||
NEWSBLUR.app.feed_list = new NEWSBLUR.Views.FeedList({el: this.$s.$feed_list[0]});
|
||||
NEWSBLUR.app.story_titles = new NEWSBLUR.Views.StoryTitlesView({
|
||||
el: this.$s.$story_titles,
|
||||
el: this.$s.$story_titles.find('.NB-story-titles'),
|
||||
collection: NEWSBLUR.assets.stories
|
||||
});
|
||||
NEWSBLUR.app.story_list = new NEWSBLUR.Views.StoryListView({collection: NEWSBLUR.assets.stories});
|
||||
|
|
|
@ -7,7 +7,7 @@ NEWSBLUR.Views.DashboardRiver = Backbone.View.extend({
|
|||
},
|
||||
|
||||
initialize: function() {
|
||||
this.$stories = this.$(".NB-module-item");
|
||||
this.$stories = this.$(".NB-module-item .NB-story-titles");
|
||||
this.story_titles = new NEWSBLUR.Views.StoryTitlesView({
|
||||
el: this.$stories,
|
||||
collection: NEWSBLUR.assets.dashboard_stories,
|
||||
|
@ -15,7 +15,6 @@ NEWSBLUR.Views.DashboardRiver = Backbone.View.extend({
|
|||
override_layout: 'split',
|
||||
on_dashboard: true
|
||||
});
|
||||
// this.$stories.html(this.story_titles.$el);
|
||||
|
||||
NEWSBLUR.assets.feeds.bind('reset', _.bind(this.load_stories, this));
|
||||
},
|
||||
|
|
|
@ -161,7 +161,7 @@ NEWSBLUR.Views.StoryTitlesView = Backbone.View.extend({
|
|||
!NEWSBLUR.assets.flags['no_more_stories']) {
|
||||
var $last = this.$('.NB-story-title:visible:last');
|
||||
var container_height = this.$story_titles.height();
|
||||
NEWSBLUR.log(["fill out", $last.length && $last.position().top, container_height, $last.length, this.$story_titles.scrollTop()]);
|
||||
// NEWSBLUR.log(["fill out", $last.length && $last.position().top, container_height, $last.length, this.$story_titles.scrollTop()]);
|
||||
NEWSBLUR.reader.counts['page_fill_outs'] += 1;
|
||||
_.delay(_.bind(function() {
|
||||
this.scroll();
|
||||
|
@ -341,7 +341,7 @@ NEWSBLUR.Views.StoryTitlesView = Backbone.View.extend({
|
|||
var visible_height = $story_titles.height() * 2;
|
||||
var total_height = this.$el.outerHeight() + NEWSBLUR.reader.$s.$feedbar.innerHeight();
|
||||
|
||||
console.log(["scroll titles", container_offset, visible_height, scroll_y, total_height, this.$el]);
|
||||
// console.log(["scroll titles", container_offset, visible_height, scroll_y, total_height, this.$el]);
|
||||
if (visible_height + scroll_y >= total_height) {
|
||||
NEWSBLUR.reader.load_page_of_feed_stories({scroll_to_loadbar: false});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue