macOS: Dock menu static actions (New Conversation, Settings)
Facebook Messenger on your desktop, without the Facebook clutter
Brought to you by:
kristoffer-r
Originally created by: kristofferR
The Dock menu currently contains only recent conversations — with zero recents there's no custom menu at all (DOCK_NS_MENU stays null). Add static items, mirroring the Linux desktop actions (Ref [#170]).
menu.rs::rebuild_recent_menus (macOS branch): always build a menu — recents (if any) → separator (only when recents exist) → New Conversation (dock:new_conversation) → Settings… (dock:settings). Remove the null-pointer branch and its keepalive-clear in macos/dock.rs (doc comment update).handle_menu_event (the recent: arm proves it). New arms: dock:new_conversation → show_main then eval window.__carrierShortcuts && window.__carrierShortcuts.newConversation() — a distinct id from the menubar's because a Dock click can arrive with the window hidden and must surface it first; dock:settings → same body as preferences. Extract the eval string into a shared const (coordinate with [#170], which needs the same one — whichever lands first extracts it).rebuild_recent_menus already runs from apply_settings at startup and the carrier:recent-threads listener, so the static items appear from launch.carrier:// URL-scheme issue's run_app_action dispatch lands first, route through it for retry behavior instead.dock_menu_entries(threads) -> Vec<DockEntry> helper unit-tested for ordering/separator with 0 and N threads; manual — right-click Dock icon with zero recents and with recents, click both items with window hidden and visible.Part of [#179].
Originally posted by: kristofferR
Implemented in [#188] and merged to main. The macOS Dock menu now always includes New Conversation and Settings, even with no recent conversations.
Related
Tickets:
#188Ticket changed by: kristofferR