Fixed Template account_alert_toggle does not respect $newUnreadStatus variable

TickTackk

Well-known member
Affected version
2.2.1
This template should be making use $newUnreadStatus instead of calling $alert.isUnread() mostly because $newUnreadStatus is defining the action if the user is marking the alert as "read" or "read".

For example if a user decides open "Mark as unread" in a new tab and then marks as unread in the alert list, goes back to the other tab and refreshes the page, user will as see "Mark as read" instead of Mark as unread".
 
Last edited:
Thank you for reporting this issue, it has now been resolved. We are aiming to include any changes that have been made in a future XF release (2.2.2).

Change log:
Ensure the UI properly respects an explicit request to mark an alert as read or unread when a confirmation message is shown.
There may be a delay before changes are rolled out to the XenForo Community.
 
For example if a user decides open "Mark as unread" in a new tab and then marks as unread in the alert list, goes back to the other tab and refreshes the page, user will as see "Mark as read" instead of Mark as unread".
It's worth mentioning that this will still happen with the fix, because $newUnreadStatus is only fixed if the URL contains an explicit unread=0/1 flag. It's not included in the scenario mentioned. Without it, the action shown in the UI will be correct based on the state of the alert.
 
Top Bottom