Skip to content

fix: save media-only deleted messages with type placeholder#382

Open
denfry wants to merge 2 commits into
AyuGram:devfrom
denfry:fix-deleted-messages-media
Open

fix: save media-only deleted messages with type placeholder#382
denfry wants to merge 2 commits into
AyuGram:devfrom
denfry:fix-deleted-messages-media

Conversation

@denfry

@denfry denfry commented Jun 2, 2026

Copy link
Copy Markdown

Summary

  • addDeletedMessage had an early return on message.text.empty(), silently discarding all media-only deleted messages (photos, videos, stickers, voice, GIFs, files without a caption)
  • Messages with a caption were already saved correctly since the caption became the text — but any media without caption was never written to the database and never appeared in the deleted messages viewer
  • Fix: when text is empty, check item->media() and assign a localized type placeholder ("Photo", "Video", "Video message", "Voice message", "Sticker", "GIF", "Audio file", "File") before saving — same strings Telegram uses in the dialog list preview
  • Messages with no text and no media (e.g. service messages) are still skipped

Fixes #374


This PR was AI generated.

denfry added 2 commits June 2, 2026 08:45
…t high DPI

AyuAssets::currentAppLogo() creates images with devicePixelRatio set to
style::DevicePixelRatio() (e.g. 2.0 at 200% scaling). After scaledToWidth()
Qt preserves that DPR, making the logical canvas size args.size/DPR while
WithSmallCounter uses args.size as drawing coordinates — causing the badge
to render partially outside bounds (visible as a grey triangle).

Upstream Telegram loads logo from PNG files (DPR=1 by default), so this
mismatch only affects AyuGram. Resetting to 1.0 before caching aligns the
painter's logical space with the coordinate system used by counter drawing.

Fixes AyuGram#310
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.

"Посмотреть Удалёнки" в Группу

1 participant