FIX: a topic should be visited when you've read everything and there's deleted posts at the end

This commit is contained in:
Régis Hanol
2017-12-15 00:00:48 +01:00
parent 4fcf9ece3a
commit 2f792bc59f
2 changed files with 33 additions and 17 deletions

View File

@ -37,7 +37,8 @@ const Topic = RestModel.extend({
@computed('last_read_post_number', 'highest_post_number')
visited(lastReadPostNumber, highestPostNumber) {
return lastReadPostNumber === highestPostNumber;
// >= to handle case where there are deleted posts at the end of the topic
return lastReadPostNumber >= highestPostNumber;
},
@computed('posters.firstObject')