FIX: Some last read position fixes
This commit is contained in:
parent
c3ceb6ef7d
commit
810b213ca0
|
@ -134,7 +134,9 @@ export default Ember.Component.extend({
|
|||
isDocked = offset >= threshold - windowHeight + topicProgressHeight + composerHeight;
|
||||
}
|
||||
|
||||
const dockPos = $(document).height() - $('#topic-footer-main-buttons').offset().top - topicProgressHeight;
|
||||
const $mainButtons = $('#topic-footer-main-buttons');
|
||||
const mainPos = $mainButtons.length > 0 ? $mainButtons.offset().top : 0;
|
||||
const dockPos = $(document).height() - mainPos - topicProgressHeight;
|
||||
|
||||
if (composerHeight > 0) {
|
||||
if (isDocked) {
|
||||
|
|
|
@ -870,7 +870,7 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
|
|||
}
|
||||
|
||||
const max = _.max(postNumbers);
|
||||
if (max > topic.get("last_read_post_number")) {
|
||||
if (max > (topic.get("last_read_post_number") || 0)) {
|
||||
topic.set("last_read_post_number", max);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue