Contacts management.

This commit is contained in:
Burak Kaan Köse
2026-03-01 21:07:10 +01:00
parent bdd32786d6
commit e816e87f61
19 changed files with 855 additions and 32 deletions
+11
View File
@@ -51,6 +51,8 @@ public class DatabaseService : IDatabaseService
Connection.CreateTableAsync<MailItemFolder>(),
Connection.CreateTableAsync<MailAccount>(),
Connection.CreateTableAsync<AccountContact>(),
Connection.CreateTableAsync<ContactGroup>(),
Connection.CreateTableAsync<ContactGroupMember>(),
Connection.CreateTableAsync<CustomServerInformation>(),
Connection.CreateTableAsync<AccountSignature>(),
Connection.CreateTableAsync<MergedInbox>(),
@@ -117,6 +119,15 @@ public class DatabaseService : IDatabaseService
.ExecuteAsync($"ALTER TABLE {nameof(CustomServerInformation)} ADD COLUMN {nameof(CustomServerInformation.CalendarSupportMode)} INTEGER NOT NULL DEFAULT 0")
.ConfigureAwait(false);
}
var contactColumns = await Connection.GetTableInfoAsync(nameof(AccountContact)).ConfigureAwait(false);
if (!contactColumns.Any(c => c.Name == nameof(AccountContact.ContactPictureFileId)))
{
await Connection
.ExecuteAsync($"ALTER TABLE {nameof(AccountContact)} ADD COLUMN {nameof(AccountContact.ContactPictureFileId)} TEXT NULL")
.ConfigureAwait(false);
}
}
private async Task EnsureIndexesAsync()