Skip to content

Create actions from notification/report for message swipes - #2947

Merged
EricBAndrews merged 1 commit into
mlemgroup:mainfrom
aqylbermeshtech:main
Sep 2, 2026
Merged

Create actions from notification/report for message swipes#2947
EricBAndrews merged 1 commit into
mlemgroup:mainfrom
aqylbermeshtech:main

Conversation

@aqylbermeshtech

@aqylbermeshtech aqylbermeshtech commented Aug 30, 2026

Copy link
Copy Markdown
Contributor

Issues

Description

MessageView hardcoded a single trailing "mark read" swipe instead of reading the inbox swipe configuration, so private message rows ignored Settings → Inbox → Swipe Actions. It now uses the same ReplyBarConfiguration (interactionBar_reply) that ReplyView uses.

Implementation Notes

Adds a quickSwipes(notification:message:report:configuration:) overload alongside the existing one in ContextMenu+InboxNotification.swift, plus a private ActionSeed.createAction(notification:message:report:) helper that resolves each seed against notification → report → message — the same order contextMenu(notification:message:report:) already uses in that file.

Seeds that don't apply to messages (upvote, downvote, save) return nil and drop out via compactMap, so only the applicable configured actions render.

With the default config, message rows now show Reply where they previously showed Mark Read. Agreed as the desired behavior in #2925.

Add a quickSwipes overload that accepts an InboxNotification, Message and Report plus configuration so swipe actions can be resolved in the context of a notification or report. Implement ActionSeed.createAction(notification:message:report:) to prefer notification- or report-specific actions and fall back to message actions. Update MessageView to use the new API and add the interactionBar_reply setting; remove the old trailingSwipes helper and an unused import. This lets message rows surface the correct actions when shown as inbox notifications or reports.
@aqylbermeshtech
aqylbermeshtech requested a review from a team as a code owner August 30, 2026 13:56
@aqylbermeshtech
aqylbermeshtech requested review from EricBAndrews and Sjmarf and removed request for a team August 30, 2026 13:56

@EricBAndrews EricBAndrews left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! 💯

@EricBAndrews
EricBAndrews merged commit 007aa2b into mlemgroup:main Sep 2, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

MessageView should use same swipe action configuration as replies

2 participants