Commit graph

26 commits

Author SHA1 Message Date
map
2d24bab6f9 MailSet support (static mail listIds)
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.
2024-08-20 16:19:58 +02:00
wrd
8ab3b14edd Move files to new folder structure
Co-authored-by: @rih-tutao
2024-07-26 16:42:13 +02:00
jhm
b6ad11e33a Remove LegacyMailWrapper (legacy mail bodies) and cleanup TutanotaModel
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>
2024-07-26 16:03:01 +02:00
ivk
ad83f751b2 Extended notification preview, change credential encryption
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>
2024-05-22 14:10:08 +00:00
vis
16a5590760 Disallow Partial instance initializers
Co-authored-by: @paw-hub, @mpfau, @vaf-hub
tutanota#6118
2023-12-12 18:52:44 +01:00
vis
af9d0e668c Enforce providing initializer when creating instances
Thanks @charlag for the solution for tests!

tutanota#6118
2023-12-12 18:52:44 +01:00
nig
e57b9c7ff2 threaded sqlcipher
#5112
2023-09-22 12:09:18 +02:00
ivk
ada89d6fc2 Switch to @tutao/otest from ospec 2023-07-28 16:08:22 +02:00
nig
978d9780c2 fix linter errors for missing node: protocol
close #4367
2023-05-05 11:29:09 +02:00
nig
87a7c83d17 fix updated clients caching backported events with missing exclusions
fix #5320
2023-03-30 10:03:20 +02:00
vaf
1919cee2f5 add referral link setting and news item, see server issue 1349, 1350, 1351 2023-03-22 09:14:11 +00:00
wrd
d6ada95fc4 fix broken test 2023-01-20 10:26:06 +01:00
wrd
e72305eb3f Add ability to move folders
close #4858
2023-01-20 10:26:06 +01:00
map
b29a7b319a add MailDetails feature, #4719
server issues: 1276, 1271, 1279, 1272, 1270, 1258, 1254, 1253, 1242, 1241
2023-01-12 11:41:40 +01:00
ivk
50b23ebd1b Run prettier on the whole project 2022-12-27 16:08:23 +01:00
nig
0e62cedf88 [refactor] split GroupViewer into view and model 2022-12-19 17:43:47 +01:00
jhm
11b475c7ff Move vaccumDb, closeDb call to iOS ViewController 2022-12-13 16:59:26 +01:00
jhm
e3304f2fbe Create new test for ranges db lock and fix tests 2022-12-13 16:59:26 +01:00
jhm
2203374313 Lock "ranges" database write/read access
We want to lock the access to the "ranges" database when
writing/reading in order to prevent race conditions.
2022-12-13 16:59:26 +01:00
jhm
79abde10d1 Offline storage clearExcludedData after login and activate incremental_vacuum
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
2022-12-13 16:59:26 +01:00
ivk
b3588fe079 Remove entities when the owner group membership is lost
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
2022-10-27 15:50:33 +02:00
nig
22efb3f46b [desktop] move SQL from node process to web app
close #4293
2022-08-18 15:12:05 +02:00
nig
9bc1c40be3 [desktop] Fix multiple issues with offline database deletion
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.
2022-07-21 15:25:38 +02:00
jom
1748142a0a Consolidate naming of credentials handling interfaces
#4210
2022-07-21 14:10:37 +02:00
nig
0f1314d186
[refactor] move getTypeId from OfflineStorage to TypeRef 2022-05-25 17:04:21 +02:00
jom
ca177b74f5
Add framework for migrating offline database
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)