[openstreetmap/openstreetmap-website] Remove "expired unread" short block status (PR #5454)
Tom Hughes
notifications at github.com
Thu Jan 2 18:44:23 UTC 2025
@tomhughes commented on this pull request.
> @@ -27,14 +27,10 @@ def block_status(block)
def block_short_status(block)
if block.active?
- if block.needs_view?
- if block.ends_at > Time.now.utc
- t("user_blocks.helper.short.active_unread")
- else
- t("user_blocks.helper.short.expired_unread")
- end
- else
+ if block.ends_at > Time.now.utc || block.deactivates_at
Is the `deactivates_at` test needed?
I don't see how that will ever be set for a block which is active but which has passed the `ends_at` test, given that a block is active if it hasn't passed the end time or needs a view, and viewing a block that needs a view clears the needs view flag.
--
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/5454#pullrequestreview-2528055153
You are receiving this because you are subscribed to this thread.
Message ID: <openstreetmap/openstreetmap-website/pull/5454/review/2528055153 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20250102/a270be0c/attachment.htm>
More information about the rails-dev
mailing list