In order to allow importing of mails we replace legacy MailFolders
(non-static mail listIds) with new MailSets (static mail listIds).
From now on, mails have static mail listIds and static mail elementIds.
To move mails between new MailSets we introduce MailSetEntries
("entries" property on a MailSet), which are index entries sorted by
the received date of the referenced mails (customId). This commit adds
support for new MailSets, while still supporting legacy MailFolders
(mail lists) to support migrating gradually.
* TutanotaModelV74 adds:
* MailSet support
* and defaultAlarmList on GroupSettings
* SystemModelV107 adds model changes for counter (unread mails) updates
* Adapt mail list to show MailSet and legacy mails
The list model is now largely unaware about listIds since it can
display mails from multiple MailBags. MailBags are static mailLists
from which a mail is only removed from when the mail is permanently
deleted.
* Adapt offline storage for mail sets
Offline storage gained the ability to provide cached entities
from a list of ids.
Prior to starting implementing static MailIds and MailSets, we
want to clean up the current TutanotaModel. Therefore, this commit
removes a lot of legacy metamodel definitions that are not used any
longer, including removing the LegacyMailWrapper (legacy mail bodies).
Additionally, this commit inter alia includes:
* removing types no longer needed after migrating to MailDetails, e.g.
the "body", "toRecipients", "ccRecipients", "bccRecipients",
"replyTos", "sentDate" and "headers" references / values from MAIL_TYPE
* removing "mails" reference form MAIL_BOX_TYPE
* removing "subFolders" reference from MAIL_FOLDER
* removing the legacy types MAIL_BODY_TYPE and MAIL_HEADERS
* removing Value.OLD_OWNER_GROUP_NAME, and Value.OLD_AREA_ID_NAME from
FILE_TYPE and CONTACT_TYPE
Closes#7255
Co-authored-by: sug <sug@tutao.de>
Implemented extended notifications which include the sender.
Re-implemented credential encryption and storage, moved credential
data to the native storage, changed credential encryption on mobile to
always be device lock + implement app lock independently of encryption.
Re-implemented SSE on desktop in a more modular way.
Re-organized iOS app to share the code between the main app code and
app extensions.
Close#6608
Co-authored-by: wec43 <wec@tutao.de>
To improve login performance, we want to clear excluded data
(i.e. trash and spam lists, old data) from the offline storage after the login.
We also want to activate "auto_vacuum = incremental" for the offline storage database
in order to allow for faster vacuum execution and run "incremental_vacuum" before
the database is closed.
Fixes#4723
Add ownerGroup column to offline db.
We detect the relationship change by the update of the user. We track
current user in cache storage because it already was receiving it in
case of offline storage and storage already had appropriate lifecycle
for it.
We empty the tables instead of migrating them because we want to remove
them anyway due to corruption (see #4664)
fix#2874
fix#4344
When the database file was corrupted or got out of sync with the key
then it wasn't handled in any way, we would just fall back to the
ephemeral cache.
Now we delete the database and create it again, there's nothing else
we can do.
fix#4382
When adding another account that would override existing stored
credential we would generate a new database key but we would try to
use it with the old database.
Now instead we are forcing the creation of new database and delete
the old one directly from the worker.
When there is a model change on the server that would conflict with
the entities stored in the offline database, we need to do a migration
We generate some model diffs with the code generator and use them
for a compile-time check.
Co-authored-by: ivk <ivk@tutao.de>
2022-05-25 16:30:34 +02:00
Renamed from test/tests/api/worker/rest/OfflineStorageTest.ts (Browse further)