bjoern
64ab86a1a6
Merge pull request #1705 from deltachat/seen_ephemeral_timer
...
Start ephemeral timer immediately for already seen messages
2020-07-13 02:21:22 +02:00
B. Petersen
4b445b7dd7
use time::SystemTime instead of time::Instant as the latter may use libc::clock_gettime(CLOCK_MONOTONIC) eg. on android and does not advance while being in deep sleep mode. therefore, time::Instant is not a reliable way for timeouts or stoping times.
2020-07-13 02:27:03 +03:00
Alexander Krotov
d54ade5891
Start ephemeral timer for non-fresh messages
2020-07-13 01:20:16 +03:00
Alexander Krotov
0da21aa9f6
dc_receive_imf: rename timer into ephemeral_timer
2020-07-13 01:15:51 +03:00
Alexander Krotov
1e84e81e7d
imap: expunge folder before IDLE if needed
...
This ensures Inbox is expunged timely in setups that don't watch
DeltaChat folder.
2020-07-13 00:54:20 +03:00
Alexander Krotov
4f78e2e14e
Do not show an error on IMAP connection failure
...
It is annoying as it happens every time the server is rebooted.
2020-07-12 17:17:26 +02:00
Alexander Krotov
7da69a4644
Add dc_msg_get_ephemeral_{timer, timestamp}()
2020-07-11 22:25:17 +03:00
Alexander Krotov
8efe7cade7
Rename part_mut into part
2020-07-11 21:43:02 +03:00
Alexander Krotov
18e4abc1df
Remove some and deny new indexing and slicing
2020-07-11 21:43:02 +03:00
Hocuri
ee7b7eb4f2
Once more, fix #1575 Messages sent by DeltaChat trigger spam filters due to incorrect/non-compliant formatting options
2020-07-11 21:10:06 +03:00
Hocuri
b50410ab15
Fix #1687
2020-07-11 17:38:48 +02:00
Hocuri
9f7567c1d1
Abort on failing imap configuring
2020-07-11 14:27:15 +02:00
Hocuri
68e3bce60e
Remove error!() from https://github.com/deltachat/deltachat-core-rust/pull/1539
...
it led to a less clear error message being shown when the configure
failed.
2020-07-11 14:27:15 +02:00
Hocuri
86bc54508f
More explicit
2020-07-11 14:27:15 +02:00
Hocuri
ae2fd4014a
Emit Event::ErrorNetwork again
2020-07-11 14:27:15 +02:00
Hocuri
2c23433185
Make it work
...
Add a mutex to prevent a race condition when a "your pw is wrong" warning is sent, resulting in multiple messeges being sent.
Do not mute the device chat but "only" send MsgsChanged event when no
notification shall be shown.
More logging.
2020-07-11 14:27:15 +02:00
Hocuri
3f2e67f07a
First try for notification
2020-07-11 14:27:14 +02:00
Hocuri
06a4f15995
Better warning if the pw is wrong
2020-07-11 14:27:14 +02:00
Alexander Krotov
e2c532704a
Fix documentation typo
2020-07-11 00:04:38 +03:00
Alexander Krotov
f28a0db7d0
Store typed timer in ChatEphemeralTimerModified event
2020-07-10 02:55:17 +03:00
Alexander Krotov
e5d5009d6a
Emit ChatEphemeralTimerModified when user changes the timer
2020-07-10 02:52:45 +03:00
Alexander Krotov
0ae8663eed
imap: call dc_receive_imf sequentially
...
Parallel processing of messages results in bugs such as messages sent by
a new member being processed before the message that adds this member to
the chat, even when it has lower UID. In this case, messages are shown as
"[Unknown sender for this chat. See 'info' for more details.]", while
there is a message "Member ... added" right before, because writing the
information about new member to the database takes longer then reading
old index from the database.
2020-07-10 00:40:52 +03:00
Alexander Krotov
d1ec0e2de6
Fix Chatlist::try_load() doc comment
2020-07-09 23:19:33 +03:00
Alexander Krotov
7f8f871813
Make ephemeral timer changes not ephemeral
2020-07-08 20:25:05 +03:00
Alexander Krotov
43c4816739
Display source for IMAP IDLE errors
2020-07-08 01:32:49 +03:00
Alexander Krotov
1b5d08e6ee
Start ephemeral timers during housekeeping
2020-07-08 01:16:01 +03:00
Alexander Krotov
bb9603661a
Fix a typo
2020-07-07 22:38:50 +03:00
dignifiedquire
7d08397b48
cleanup interrupt and exit of imap idle
2020-07-07 16:09:13 +03:00
Alexander Krotov
d9314227ee
Do not duplicate system messages about timer changes
...
Instead, replace them with localized stock strings using set_better_msg.
2020-07-02 14:20:55 +03:00
Alexander Krotov
6050f0e2a1
Always schedule next ephemeral task after message deletion
...
If no messages were deleted, it means the task was scheduled earlier
then needed and should be rescheduled.
2020-07-01 22:18:36 +03:00
Alexander Krotov
d4dea0d5c6
Schedule ephemeral task 1 second later
...
This accounts for 1-second rounding, otherwise the task is always too early.
2020-07-01 22:18:36 +03:00
Alexander Krotov
5a28b669f9
Set ephemeral timer for info messages
2020-07-01 20:32:37 +03:00
Alexander Krotov
d59475f9bb
Fix a typo in UnknownSenderForChat
2020-07-01 19:11:48 +03:00
Alexander Krotov
db6623d0cf
Add stock strings for ephemeral timer changes
2020-07-01 12:31:51 +03:00
Alexander Krotov
059caee527
Add "by me" to "Ephemeral message timer changed to"
...
Otherwise this message looks different on other devices of the sender.
2020-07-01 12:31:51 +03:00
Alexander Krotov
7a7dcc8b8f
constants.rs: remove unused DC_STR_* constants
...
They are also outdated.
2020-07-01 07:55:22 +03:00
Alexander Krotov
d79c918c9e
Replace 1 with DC_CONTACT_ID_SELF
2020-07-01 00:59:07 +03:00
Alexander Krotov
615a76f35e
Add timestamp to DayMarker
...
With this change, API user does not need to look at the timestamp of
the next message to display the day marker, but can get the timestamp
directly from the marker. This way there is no database query and no
risk of error as a result of database being busy or message being deleted.
2020-06-30 01:21:18 +03:00
Alexander Krotov
0c47489a3b
Use ephemeral::Timer in MsgId.ephemeral_timer() method
2020-06-29 23:04:34 +03:00
Alexander Krotov
f931a905a7
Remove useless comment
2020-06-29 23:04:34 +03:00
Alexander Krotov
7d048ac419
Add autodelete timers
2020-06-29 23:04:34 +03:00
Alexander Krotov
41fe3db79d
Add ChatItem type
...
ChatItem can represent markers as enum variants instead of special MsgIds.
2020-06-29 00:30:17 +03:00
Alexander Krotov
fdacf98b69
handle_mdn: compare from_id to DC_CONTACT_ID_LAST_SPECIAL
...
DC_MSG_ID_LAST_SPECIAL has the same value, but from_id is not a msg id.
2020-06-26 01:11:15 +03:00
B. Petersen
e3c90aff22
add more tests for BlobObject::sanitise_name()
2020-06-23 18:51:40 +02:00
bjoern
aeb8a2e260
Revert "Switch to sanitize-filename-reader-friendly"
...
This reverts commit 93797bc82f .
2020-06-23 18:11:18 +02:00
Alexander Krotov
93797bc82f
Switch to sanitize-filename-reader-friendly
...
One advantage is that it does not depend on any crates, so there is a
higher chance of dropping regex crate eventually.
2020-06-23 14:37:35 +03:00
B. Petersen
0fbddc939b
update provider-db
2020-06-23 08:06:32 +02:00
Alexander Krotov
a031151587
Fix two +nightly clippy suggestions
2020-06-23 03:17:07 +03:00
B. Petersen
545ff4f7ba
apply config_defaults only for unset values
...
instead of applying all config_defaults unconditionally
after the first configure, a config_defaults for a given key
is now applied when this key has never been set before.
this way, you can set some keys before calling configure()
and also, later versions can add new defaults for new keys
(that would require another call to configure() then, however)
2020-06-23 00:48:40 +02:00
B. Petersen
74ea884aa4
remove now superfluous interrupting on watch-settings-changes
2020-06-22 13:48:33 +02:00