This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/app/assets/javascripts/discourse/app
Martin Brennan c6c633e041
FIX: Issues with incorrect unread and private message topic tracking state (#16474)
This commit fixes two issues at play. The first was introduced
in f6c852b (or maybe not introduced
but rather revealed). When a user posted a new message in a topic,
they received the unread topic tracking state MessageBus message,
and the Unread (X) indicator was incremented by one, because with the
aforementioned perf commit we "guess" the correct last read post
for the user, because we no longer calculate individual users' read
status there. This meant that every time a user posted in a topic
they tracked, the unread indicator was incremented. To get around
this, we can just exclude the user who created the post from the
target users of the unread state message.

The second issue was related to the private message topic tracking
state, and was somewhat similar. Whenever a user created a new private
message, the New (X) indicator was incremented, and could not be
cleared until the page was refreshed. To solve this, we just don't
update the topic state for the user when the new_topic tracking state
message comes through if the user who created the topic is the
same as the current user.

cf. https://meta.discourse.org/t/bottom-of-topic-shows-there-is-1-unread-remaining-when-there-are-actually-0-unread-topics-remaining/220817
2022-04-19 11:37:01 +10:00
..
adapters FEATURE: Display pending posts on user’s page 2021-11-29 10:26:33 +01:00
components Revert: UX: Make full topic row clickable on mobile (#16440) (#16472) 2022-04-13 18:35:47 -04:00
controllers FIX: Show dismiss all modal in user-notifications page (#16491) 2022-04-18 22:32:39 +08:00
helpers DEV: Add category-color variable (#15807) 2022-02-03 13:16:27 -06:00
initializers FIX: Ensure images do not change height when loading is complete (#16368) 2022-04-05 13:43:17 +01:00
lib FEATURE: add user_suspended attribute in post serialize. (#16413) 2022-04-13 19:58:09 +05:30
mixins DEV: Minor in-progress-uploads refactor (#16430) 2022-04-11 11:50:06 +10:00
models FIX: Issues with incorrect unread and private message topic tracking state (#16474) 2022-04-19 11:37:01 +10:00
pre-initializers FIX: Ensure all/none subcategory filters work correctly with tags 2022-03-22 15:26:00 +00:00
raw-views DEV: Use method definition syntax consistently (#14915) 2021-11-13 14:01:55 +01:00
routes DEV: Replace deprecated String.prototype.substr() (#16233) 2022-04-01 17:35:17 +02:00
services FIX: Better 0 file size detection and logging (#16116) 2022-03-07 12:39:33 +10:00
styles DEV: Migrate to Ember CLI (#11932) 2021-02-03 14:22:20 -05:00
templates DEV: Add index to each helper for access within topic-list-items (#16483) 2022-04-14 14:24:07 -05:00
widgets FIX: Href attribute for post-date link (#16471) 2022-04-13 23:09:39 -04:00
app.js DEV: Improve theme error handling UX 2022-02-14 10:11:19 +00:00
index.html FIX: Ember CLI was always loading the admin payload in dev mode 2021-10-05 08:34:10 -04:00
mapping-router.js DEV: Improve and document __container__ workaround in tests (#15498) 2022-01-10 10:34:08 +00:00