truncate incoming messages by lines (#3480)

* truncate incoming messages by lines,
because many linebreaks seem to cause the chat open delay on deltachat-ios

* run cargo fmt

* remove DC_DESIRED_TEXT_LINES_THRESHOLD
and use Strings instead of Cow<str>

* remove usage of clippy::indexing_slicing in truncate_by_lines (#3596)

* adjust comments

* Fix truncate_by_lines tests

* Reword indexing/slicing error

* Remove unnecessary conditional

* Fix a typo in the comment

Co-authored-by: link2xt <link2xt@testrun.org>
This commit is contained in:
Simon Laux
2022-09-17 16:15:33 +02:00
committed by GitHub
parent 569628a202
commit 62afd3d4c3
4 changed files with 151 additions and 12 deletions

View File

@@ -61,6 +61,7 @@
this affects `dc_get_chat_contacts()`, `dc_get_contacts()` and `dc_get_blocked_contacts()` #3562
- add `internet_access` flag to `dc_msg_get_webxdc_info()` #3516
- `DC_EVENT_WEBXDC_INSTANCE_DELETED` is emitted when a message containing a webxdc gets deleted #3105
- truncate incoming messages by lines instead of just length #3480
### Fixes
- do not emit notifications for blocked chats #3557