Repository navigation
Fix attachments not opening - #44
thecalamityjoe87 wants to merge 1 commit into
Conversation
Attachments were failing to open in default app when user clicked on an attachment in the gallery
|
Be advised, PR #49 contains this fix. |
|
Isaac — this one was a genuinely great find, and it landed almost verbatim ( Your one-character constant fix was the whole story: The portal-based opening ( Closing since it's on |
Clicking an attachment did nothing. The staging code asked open() for O_NOFOLLOW but passed 0o200000, which on Linux is O_DIRECTORY: creating a regular file with it fails, so no attachment could be staged — and the symlink refusal the flag was meant to provide was silently absent. The constant is now the real O_NOFOLLOW (0o400000), with a comment naming the old bug so it can't quietly return. Opening also goes through the XDG portal (UriLauncher, properly parented) instead of AppInfo::launch_default_for_uri, which under Flatpak — or for a type with no registered default app — silently does nothing; the portal shows GNOME's app chooser instead. The old call remains as a fallback when the portal itself is unreachable. Adapted from PR #44. Co-Authored-By: Isaac <177023792+thecalamityjoe87@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
In the attachments gallery and the in-message drawer, a PDF now renders its first page (via poppler-glib, at 360px for sharpness, on a white ground so transparent pages don't punch holes in dark mode) instead of showing the generic red type icon. A PDF that fails to parse falls back to the icon as before. The Flatpak manifest gains a poppler module (config after Evince's, JPEG2000 off); native builds need poppler-glib-devel / libpoppler-glib-dev. Adapted from PR #49 (issue #48) — its copy of the #44 opening fix had already landed separately. Co-Authored-By: Isaac <177023792+thecalamityjoe87@users.noreply.github.com> Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The drawer's flow gets single selection: one click paints a soft rounded accent wash over the cell (grid and list layouts alike), and Space or Enter then activates the highlighted attachment — images and PDFs into the in-app lightbox, everything else to its default app — mirroring double-click, which is untouched. The Nautilus-style flow isorropisths asked for; the bug half of #37 (Open doing nothing) shipped back in 1.15.x via thecalamityjoe87's PR #44. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U8NunGhmvK96frgHdaL6Vu
Clicking an attachment did nothing. The staging code asked open() for O_NOFOLLOW but passed 0o200000, which on Linux is O_DIRECTORY: creating a regular file with it fails, so no attachment could be staged — and the symlink refusal the flag was meant to provide was silently absent. The constant is now the real O_NOFOLLOW (0o400000), with a comment naming the old bug so it can't quietly return. Opening also goes through the XDG portal (UriLauncher, properly parented) instead of AppInfo::launch_default_for_uri, which under Flatpak — or for a type with no registered default app — silently does nothing; the portal shows GNOME's app chooser instead. The old call remains as a fallback when the portal itself is unreachable. Adapted from PR hyprlab#44. Co-Authored-By: Isaac <177023792+thecalamityjoe87@users.noreply.github.com>
In the attachments gallery and the in-message drawer, a PDF now renders its first page (via poppler-glib, at 360px for sharpness, on a white ground so transparent pages don't punch holes in dark mode) instead of showing the generic red type icon. A PDF that fails to parse falls back to the icon as before. The Flatpak manifest gains a popple 91D3 r module (config after Evince's, JPEG2000 off); native builds need poppler-glib-devel / libpoppler-glib-dev. Adapted from PR hyprlab#49 (issue hyprlab#48) — its copy of the hyprlab#44 opening fix had already landed separately. Co-Authored-By: Isaac <177023792+thecalamityjoe87@users.noreply.github.com>
The drawer's flow gets single selection: one click paints a soft rounded accent wash over the cell (grid and list layouts alike), and Space or Enter then activates the highlighted attachment — images and PDFs into the in-app lightbox, everything else to its default app — mirroring double-click, which is untouched. The Nautilus-style flow isorropisths asked for; the bug half of hyprlab#37 (Open doing nothing) shipped back in 1.15.x via thecalamityjoe87's PR hyprlab#44.
Attachments were failing to open in default app when user clicked on an attachment in the gallery