mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Correctly positioning the feed title floater at the top of the Feed view.
This commit is contained in:
parent
f59ad8b967
commit
b6ed78ee57
3 changed files with 16 additions and 18 deletions
|
@ -1629,6 +1629,7 @@ background: transparent;
|
|||
z-index: 2;
|
||||
width: 100%;
|
||||
display: none;
|
||||
opacity: .9;
|
||||
}
|
||||
|
||||
.NB-view-river .NB-feed-story-view-floater {
|
||||
|
@ -1728,7 +1729,6 @@ background: transparent;
|
|||
border-bottom: 1px solid #000;
|
||||
border-top: 1px solid #707070;
|
||||
z-index: 2;
|
||||
opacity: .9;
|
||||
}
|
||||
#story_pane .NB-feed-story-header-feed.NB-feed-story-river-same-feed {
|
||||
z-index: 0;
|
||||
|
|
|
@ -1009,13 +1009,9 @@
|
|||
|
||||
// NEWSBLUR.log(['post_open_feed', data.stories, this.flags]);
|
||||
this.flags['opening_feed'] = false;
|
||||
// this.create_story_titles(stories);
|
||||
// this.make_story_feed_entries(stories, first_load);
|
||||
this.find_story_with_action_preference_on_open_feed();
|
||||
this.show_feed_hidden_story_title_indicator(true);
|
||||
this.show_story_titles_above_intelligence_level({'animate': false});
|
||||
// this.scroll_story_titles_to_show_selected_story_title();
|
||||
// this.fill_out_story_titles();
|
||||
if (this.counts['find_next_unread_on_page_of_feed_stories_load']) {
|
||||
this.show_next_unread_story(true);
|
||||
} else if (this.counts['find_last_unread_on_page_of_feed_stories_load']) {
|
||||
|
@ -1126,16 +1122,12 @@
|
|||
if (this.active_feed == 'starred') {
|
||||
// NEWSBLUR.log(['post_open_starred_stories', data.stories.length, first_load]);
|
||||
this.flags['opening_feed'] = false;
|
||||
// this.create_story_titles(data.stories, {'river_stories': true});
|
||||
// this.make_story_feed_entries(data.stories, first_load, {'river_stories': true});
|
||||
this.find_story_with_action_preference_on_open_feed();
|
||||
if (this.counts['select_story_in_feed'] || this.flags['select_story_in_feed']) {
|
||||
this.select_story_in_feed();
|
||||
}
|
||||
this.show_story_titles_above_intelligence_level({'animate': false});
|
||||
this.flags['story_titles_loaded'] = true;
|
||||
// this.scroll_story_titles_to_show_selected_story_title();
|
||||
// this.fill_out_story_titles();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -1198,8 +1190,6 @@
|
|||
this.flags['non_premium_river_view'] = true;
|
||||
}
|
||||
this.flags['opening_feed'] = false;
|
||||
// this.create_story_titles(data.stories, {'river_stories': true});
|
||||
// this.make_story_feed_entries(data.stories, first_load, {'river_stories': true});
|
||||
this.show_feed_hidden_story_title_indicator(true);
|
||||
this.find_story_with_action_preference_on_open_feed();
|
||||
this.show_story_titles_above_intelligence_level({'animate': false});
|
||||
|
@ -1211,8 +1201,6 @@
|
|||
} else if (this.counts['select_story_in_feed'] || this.flags['select_story_in_feed']) {
|
||||
this.select_story_in_feed();
|
||||
}
|
||||
// this.scroll_story_titles_to_show_selected_story_title();
|
||||
// this.fill_out_story_titles();
|
||||
this.hide_stories_progress_bar();
|
||||
}
|
||||
},
|
||||
|
@ -1316,8 +1304,6 @@
|
|||
|
||||
if (this.active_feed && NEWSBLUR.utils.is_feed_social(this.active_feed)) {
|
||||
this.flags['opening_feed'] = false;
|
||||
// this.create_story_titles(data.stories, {'river_stories': true});
|
||||
// this.make_story_feed_entries(data.stories, first_load, {'river_stories': true});
|
||||
this.find_story_with_action_preference_on_open_feed();
|
||||
this.show_story_titles_above_intelligence_level({'animate': false});
|
||||
this.show_feed_hidden_story_title_indicator(true);
|
||||
|
@ -1329,8 +1315,6 @@
|
|||
} else if (this.counts['find_last_unread_on_page_of_feed_stories_load']) {
|
||||
this.show_last_unread_story(true);
|
||||
}
|
||||
// this.scroll_story_titles_to_show_selected_story_title();
|
||||
// this.fill_out_story_titles();
|
||||
this.hide_stories_progress_bar();
|
||||
|
||||
if (this.flags['showing_social_feed_in_tryfeed_view']) {
|
||||
|
|
|
@ -8,7 +8,6 @@ NEWSBLUR.Views.StoryListView = Backbone.View.extend({
|
|||
this.collection.bind('reset', this.reset_story_positions, this);
|
||||
this.collection.bind('add', this.add, this);
|
||||
this.collection.bind('add', this.reset_story_positions, this);
|
||||
this.collection.bind('change:selected', this.show_correct_feed_in_feed_title_floater, this);
|
||||
this.$el.bind('mousemove', _.bind(this.handle_mousemove_feed_view, this));
|
||||
this.$el.scroll(_.bind(this.handle_scroll_feed_view, this));
|
||||
this.reset_flags();
|
||||
|
@ -375,6 +374,21 @@ NEWSBLUR.Views.StoryListView = Backbone.View.extend({
|
|||
|
||||
this.check_feed_view_scrolled_to_bottom();
|
||||
}
|
||||
|
||||
if ((NEWSBLUR.reader.flags['river_view'] || NEWSBLUR.reader.flags['social_view']) &&
|
||||
!NEWSBLUR.assets.preference('feed_view_single_story')) {
|
||||
var story;
|
||||
if (NEWSBLUR.reader.flags['scrolling_by_selecting_story_title']) {
|
||||
story = this.active_story;
|
||||
} else {
|
||||
var from_top = Math.max(1, this.$el.scrollTop());
|
||||
var positions = this.cache.feed_view_story_positions_keys;
|
||||
var closest = $.closest(from_top, positions);
|
||||
story = this.cache.feed_view_story_positions[positions[closest]];
|
||||
}
|
||||
|
||||
this.show_correct_feed_in_feed_title_floater(story);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
Loading…
Add table
Reference in a new issue