Commit Graph

473 Commits

Author SHA1 Message Date
octoshrimpy 949f0da6ff Merge branch 'master' into feature/mms-compression-refactor 2026-08-01 17:37:37 -04:00
octoshrimpy 2bd62f2f94 perf(mms): decode an image once per attachment instead of per attempt
Addresses the review feedback on #826.

Compression searches for a size that fits under the carrier limit, so it encodes
the same image many times: a binary search over dimensions, then a quality ladder
from 90 down to 40 if nothing fit. Every one of those attempts went through
ImageUtils.getScaledImage, which re-opened the source URI and re-decoded it from
scratch. Decoding is the expensive part and it was the only part being repeated
unnecessarily; a large photo could be decoded a dozen or more times to send once.

ScaledImageEncoder decodes the source a single time, sampled down to no smaller
than the largest width the search will ask for, and re-encodes that bitmap from
memory for each attempt. The search itself is unchanged.

The decode is guarded: with no carrier cap the target size is the original image,
which on a modern camera sensor is large enough to matter, so an OutOfMemoryError
returns null and the caller falls back to Glide, which streams instead of holding
the whole bitmap.

Also fixes three edge cases raised in review:

- A bounds decode that fails leaves outWidth/outHeight at zero, making the aspect
  ratio 0/0 and every derived dimension garbage. Detect it and fall back rather
  than divide by it.

- searchHi was floored at 100, which raised it above the original width, and above
  the carrier maximum when that was under 100. Both upscale the image and inflate
  the payload. The floor is now 1 and the search starts at 1 rather than 100.

- The last-resort fallback hard-coded a width of 100, upscaling anything narrower.
  It is now bounded by searchHi, so it can only shrink.
2026-08-01 17:15:23 -04:00
Weblate (bot) 62d58d0998 Translations update from Hosted Weblate (#773)
* Added translation using Weblate (Japanese)

* Translated using Weblate (French)

Currently translated at 100.0% (14 of 14 strings)

Translation: QUIK/Emoji Reaction Regex
Translate-URL: https://hosted.weblate.org/projects/quik/emoji-reaction-regex/fr/

* Added translation using Weblate (Breton)

* Translated using Weblate (Bulgarian)

Currently translated at 0.0% (0 of 14 strings)

Translation: QUIK/Emoji Reaction Regex
Translate-URL: https://hosted.weblate.org/projects/quik/emoji-reaction-regex/bg/

* Added translation using Weblate (Spanish)

* Translated using Weblate (Spanish)

Currently translated at 14.2% (2 of 14 strings)

Translation: QUIK/Emoji Reaction Regex
Translate-URL: https://hosted.weblate.org/projects/quik/emoji-reaction-regex/es/

---------

Co-authored-by: Samvid Konchada <samvid@skiff.com>
Co-authored-by: Antonin Del Fabbro <message@antonin.one>
Co-authored-by: Pierre Wani Alan Morvan <per.morvan.bzh29@gmail.com>
Co-authored-by: 109247019824 <109247019824@users.noreply.hosted.weblate.org>
Co-authored-by: ekirchman <ej.kirchman@gmail.com>
2026-08-01 15:02:54 -04:00
Inhishonor 96fcb8841a refactor(mms): Add an algorithm for compressing GIFs in one pass 2026-06-30 10:07:49 -07:00
octoshrimpy b0f5107f1f fix(mms): Replace broken compression loop with binary search
Scale factor algorithm became <= 0 after 4-5 attempts regardless of
image size, silently bailing and leaving images potentially over the
carrier size limit. Replace with binary search on dimensions (100px to
carrier max) plus a quality-reduction fallback (90→40) for images that
still don't fit. Adds compressAttachment dispatch for extensibility
(audio/* logged, image/* compressed, else raw). Fixes InputStream leak
in BitmapFactory dimension probe. Queries MMS_CONFIG_ALLOW_ATTACH_AUDIO
for future audio support groundwork.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 12:36:37 -07:00
Inhishonor 65d7ffe7d0 chore: release v4.3.6 (2238) 2026-04-19 11:43:52 -07:00
Inhishonor 5674e038e0 chore: release v4.3.5 (2237) 2026-04-19 11:34:43 -07:00
ezn24 c141cd5dce Translated using Weblate (Chinese (Traditional Han script))
Currently translated at 100.0% (14 of 14 strings)

Translation: QUIK/Emoji Reaction Regex
Translate-URL: https://hosted.weblate.org/projects/quik/emoji-reaction-regex/zh_Hant/
2026-04-11 09:12:13 -06:00
ezn24 f9430fa40e Added translation using Weblate (Chinese (Traditional Han script)) 2026-04-11 09:12:13 -06:00
logmilo15 512b18d48a Translated using Weblate (Vietnamese)
Currently translated at 100.0% (14 of 14 strings)

Translation: QUIK/Emoji Reaction Regex
Translate-URL: https://hosted.weblate.org/projects/quik/emoji-reaction-regex/vi/
2026-04-11 09:12:13 -06:00
logmilo15 fa52ec6533 Added translation using Weblate (Vietnamese) 2026-04-11 09:12:13 -06:00
Niyon S V 59f507de7f Added translation using Weblate (Malayalam) 2026-04-11 09:12:13 -06:00
bomzhellino 02c26b0a93 Translated using Weblate (Russian)
Currently translated at 100.0% (14 of 14 strings)

Translation: QUIK/Emoji Reaction Regex
Translate-URL: https://hosted.weblate.org/projects/quik/emoji-reaction-regex/ru/
2026-04-11 09:12:13 -06:00
Rav Var bb3a580633 Translated using Weblate (Polish)
Currently translated at 100.0% (14 of 14 strings)

Translation: QUIK/Emoji Reaction Regex
Translate-URL: https://hosted.weblate.org/projects/quik/emoji-reaction-regex/pl/
2026-04-11 09:12:13 -06:00
Rav Var 728c962e16 Added translation using Weblate (Polish) 2026-04-11 09:12:13 -06:00
Joseph 9da7ae0eb4 Translated using Weblate (French)
Currently translated at 14.2% (2 of 14 strings)

Translation: QUIK/Emoji Reaction Regex
Translate-URL: https://hosted.weblate.org/projects/quik/emoji-reaction-regex/fr/
2026-04-11 09:12:13 -06:00
Joseph 82d7a2ab96 Added translation using Weblate (French) 2026-04-11 09:12:13 -06:00
Inhishonor 610df6d5c8 fix(contacts): Fix a potential memory leak in contact lookup 2026-04-10 10:57:54 -06:00
Inhishonor 7edea6d019 refactor(data): Use goAsync() instead of blockingGet() in message receivers 2026-04-10 10:57:54 -06:00
Cian Ormond d59deeb831 refactor(utils): Remove redundant shortcut code 2026-04-02 17:47:44 -06:00
Inhishonor c5f4fd54ab fix(utils): Allow characters to be included after normalizing numbers
Android's normalizing function stripped out characters too aggressively leading to false matches between different numbers. This commit introduces a faster normalizing function that includes characters.
2026-03-24 07:07:17 -07:00
octoshrimpy 57d95a9ac6 chore: release v4.3.4 (2236) 2026-01-25 17:50:53 +00:00
Marek Polák 091770aeb1 Translated using Weblate (Czech)
Currently translated at 100.0% (14 of 14 strings)

Translation: QUIK/Emoji Reaction Regex
Translate-URL: https://hosted.weblate.org/projects/quik/emoji-reaction-regex/cs/
2026-01-20 18:01:48 +01:00
Rasti K5 549ff657a9 Added translation using Weblate (Kurdish (Central)) 2026-01-13 23:06:32 +00:00
octoshrimpy 09a9bd136b Merge pull request #672 from Inhishonor/deduplicate-messages
Add a deduplicate message feature
2026-01-11 23:21:33 -05:00
Inhishonor c1d824abbc Add a deduplicate message feature
- Adds a new class of features for message management.
- Adds a manual option to find and delete duplicate messages
- Adds a setting to automatically delete duplicates during sync
- Adds a sha256 hashing function

Co-authored-by: octoshrimpy <octoshrimpy@users.noreply.github.com>
2026-01-11 19:36:52 -08:00
octoshrimpy 0c4dc02e45 Merge pull request #619 from weblate/weblate-quik-emoji-reaction-regex
Translations update from Hosted Weblate
2026-01-11 12:36:24 -05:00
octoshrimpy 67e9f62a62 Merge pull request #664 from Inhishonor/realm-migration
Fix realm migration again
2026-01-11 12:32:00 -05:00
octoshrimpy 41b386c7e5 Merge pull request #662 from Inhishonor/conversation-loading
Fix compose activity infinitely loading
2026-01-11 12:31:40 -05:00
octoshrimpy 05bcafac90 Merge pull request #634 from Inhishonor/duplicated-messages
Fix duplicated messages
2026-01-11 12:31:25 -05:00
octoshrimpy 6849991120 Merge pull request #648 from Inhishonor/logging-update
Clean up logging
2026-01-11 12:28:16 -05:00
octoshrimpy 5e514c9a4a Merge pull request #642 from Inhishonor/emoji-ellipses
Support matching message reactions that are truncated
2026-01-11 12:27:11 -05:00
octoshrimpy 26b752b2e5 Merge pull request #640 from Inhishonor/emoji-sync
Add a dedicated emoji reaction sync progress bar
2026-01-11 12:25:50 -05:00
octoshrimpy 45227fdb76 Merge pull request #636 from Truffle2143/master
Fix message content filters not being called
2026-01-11 12:23:34 -05:00
Benno ec926c195a Translated using Weblate (German)
Currently translated at 100.0% (14 of 14 strings)

Translation: QUIK/Emoji Reaction Regex
Translate-URL: https://hosted.weblate.org/projects/quik/emoji-reaction-regex/de/
2026-01-04 20:47:39 +01:00
Inhishonor 68f965a6ed Fix realm migration again 2025-12-31 07:07:29 -08:00
Inhishonor d1473a60a6 Provide a fallback conversation if content provider returns null
In some cases, (mainly on HyperOS and variants) content provider will return null if an empty conversation is created. This was breaking the compose activity as it expects some object other than null.

This commit changes the behavior to provide a new conversation object if createConversationFromCp ever returns null.
2025-12-30 17:55:32 -08:00
Inhishonor 1b145d21b2 Fix threading issues in the contact functions 2025-12-30 08:32:43 -08:00
109247019824 68d635feb6 Added translation using Weblate (Bulgarian) 2025-12-21 06:02:19 +01:00
Inhishonor 096c7e3c68 Clean up logging 2025-12-20 17:56:05 -08:00
Inhishonor d23b35bfe9 Support matching message reactions that are truncated
Some emoji reactions will appear as "Liked 'message...'" with the message cut off. This change uses a regex to match all ellipsis at the end of messages to any other message with the same content.
2025-12-18 18:28:50 -08:00
Inhishonor 33f10e7edd Add a dedicated emoji reaction sync process
Looks better, and provides better UX
2025-12-18 16:50:01 -08:00
Inhishonor 67bbe0e831 Do some cleanups to emoji reaction code 2025-12-17 16:38:57 -08:00
Marek Polák 6f70ea9796 Translated using Weblate (Czech)
Currently translated at 14.2% (2 of 14 strings)

Translation: QUIK/Emoji Reaction Regex
Translate-URL: https://hosted.weblate.org/projects/quik/emoji-reaction-regex/cs/
2025-12-17 20:00:20 +00:00
Truffle2143 ad8d36514f Fix message content filters not being called 2025-12-17 01:11:23 +00:00
Inhishonor 5e9b3a9d11 Fix search not recognizing special characters
The query doesn't need to be normalized anyway
2025-12-16 13:26:49 -08:00
Marek Polák 0b38ba35e4 Added translation using Weblate (Czech) 2025-12-16 19:02:13 +00:00
Kachelkaiser 8aff2e8385 Translated using Weblate (German)
Currently translated at 7.1% (1 of 14 strings)

Translation: QUIK/Emoji Reaction Regex
Translate-URL: https://hosted.weblate.org/projects/quik/emoji-reaction-regex/de/
2025-12-16 19:02:12 +00:00
Kachelkaiser f627cc7253 Added translation using Weblate (German) 2025-12-16 19:02:11 +00:00
Inhishonor 8e355fee58 Fix duplicated messages
The insert into SMS database was called twice, which caused duplicated messages to be created. This ended up breaking all sorts of functionality.
2025-12-14 17:00:27 -08:00