Import functionality for wino accounts, calendar sync UI, bunch of shell improvements
This commit is contained in:
@@ -20,6 +20,7 @@ public partial class GroupedAccountCalendarViewModel : ObservableObject
|
||||
{
|
||||
Account = account;
|
||||
AccountCalendars = new ObservableCollection<AccountCalendarViewModel>(calendarViewModels);
|
||||
AccountColorHex = account.AccountColorHex;
|
||||
|
||||
ManageIsCheckedState();
|
||||
|
||||
@@ -74,6 +75,18 @@ public partial class GroupedAccountCalendarViewModel : ObservableObject
|
||||
[ObservableProperty]
|
||||
public partial bool? IsCheckedState { get; set; } = true;
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string AccountColorHex { get; set; } = string.Empty;
|
||||
|
||||
[ObservableProperty]
|
||||
public partial bool IsSynchronizationInProgress { get; set; }
|
||||
|
||||
[ObservableProperty]
|
||||
public partial string SynchronizationStatus { get; set; } = string.Empty;
|
||||
|
||||
public bool CanSynchronize => !IsSynchronizationInProgress;
|
||||
public bool IsSynchronizationProgressVisible => IsSynchronizationInProgress;
|
||||
|
||||
private bool _isExternalPropChangeBlocked = false;
|
||||
|
||||
private void ManageIsCheckedState()
|
||||
@@ -142,4 +155,24 @@ public partial class GroupedAccountCalendarViewModel : ObservableObject
|
||||
|
||||
CalendarSelectionStateChanged?.Invoke(this, accountCalendarViewModel);
|
||||
}
|
||||
|
||||
partial void OnIsSynchronizationInProgressChanged(bool value)
|
||||
{
|
||||
OnPropertyChanged(nameof(CanSynchronize));
|
||||
OnPropertyChanged(nameof(IsSynchronizationProgressVisible));
|
||||
}
|
||||
|
||||
public void UpdateAccount(MailAccount updatedAccount)
|
||||
{
|
||||
if (updatedAccount == null || updatedAccount.Id != Account.Id)
|
||||
return;
|
||||
|
||||
Account.Name = updatedAccount.Name;
|
||||
Account.Address = updatedAccount.Address;
|
||||
Account.AccountColorHex = updatedAccount.AccountColorHex;
|
||||
Account.AttentionReason = updatedAccount.AttentionReason;
|
||||
Account.MergedInboxId = updatedAccount.MergedInboxId;
|
||||
AccountColorHex = updatedAccount.AccountColorHex;
|
||||
OnPropertyChanged(nameof(Account));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user