mirror of
https://github.com/discourse/discourse.git
synced 2025-02-16 08:15:00 +00:00
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;
|
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 (composerHeight > 0) {
|
||||||
if (isDocked) {
|
if (isDocked) {
|
||||||
|
@ -870,7 +870,7 @@ export default Ember.Controller.extend(SelectedPostsCount, BufferedContent, {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const max = _.max(postNumbers);
|
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);
|
topic.set("last_read_post_number", max);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user