Respect API calendar colors unless overridden

This commit is contained in:
Burak Kaan Köse
2026-04-11 15:18:30 +02:00
parent e206368801
commit 448ebd6036
6 changed files with 63 additions and 9 deletions
+9
View File
@@ -142,6 +142,15 @@ public class DatabaseService : IDatabaseService
.ConfigureAwait(false);
}
var accountCalendarColumns = await Connection.GetTableInfoAsync(nameof(AccountCalendar)).ConfigureAwait(false);
if (!accountCalendarColumns.Any(c => c.Name == nameof(AccountCalendar.IsBackgroundColorUserOverridden)))
{
await Connection
.ExecuteAsync($"ALTER TABLE {nameof(AccountCalendar)} ADD COLUMN {nameof(AccountCalendar.IsBackgroundColorUserOverridden)} INTEGER NOT NULL DEFAULT 0")
.ConfigureAwait(false);
}
await Connection.ExecuteAsync("DROP TABLE IF EXISTS WinoAccountAddOnCache").ConfigureAwait(false);
}