Remove sqlite base64 contact store from AccountContact.
This commit is contained in:
@@ -12,7 +12,6 @@ public partial class AccountContactViewModel : ObservableObject, IMailItemDispla
|
||||
public string Address { get; set; }
|
||||
public string Name { get; set; }
|
||||
public Guid? ContactPictureFileId { get; set; }
|
||||
public string Base64ContactPicture { get; set; }
|
||||
public bool IsRootContact { get; set; }
|
||||
public bool IsOverridden { get; set; }
|
||||
|
||||
@@ -22,7 +21,6 @@ public partial class AccountContactViewModel : ObservableObject, IMailItemDispla
|
||||
Address = contact.Address;
|
||||
Name = contact.Name;
|
||||
ContactPictureFileId = contact.ContactPictureFileId;
|
||||
Base64ContactPicture = contact.Base64ContactPicture;
|
||||
IsRootContact = contact.IsRootContact;
|
||||
IsOverridden = contact.IsOverridden;
|
||||
}
|
||||
@@ -75,7 +73,6 @@ public partial class AccountContactViewModel : ObservableObject, IMailItemDispla
|
||||
Address = Address,
|
||||
Name = Name,
|
||||
ContactPictureFileId = ContactPictureFileId,
|
||||
Base64ContactPicture = Base64ContactPicture,
|
||||
IsRootContact = IsRootContact,
|
||||
IsOverridden = IsOverridden
|
||||
};
|
||||
|
||||
@@ -35,7 +35,7 @@ public partial class MailItemViewModel(MailCopy mailCopy) : ObservableRecipient,
|
||||
[NotifyPropertyChangedFor(nameof(FileId))]
|
||||
[NotifyPropertyChangedFor(nameof(FolderId))]
|
||||
[NotifyPropertyChangedFor(nameof(UniqueId))]
|
||||
[NotifyPropertyChangedFor(nameof(Base64ContactPicture))]
|
||||
[NotifyPropertyChangedFor(nameof(ContactPictureFileId))]
|
||||
[NotifyPropertyChangedFor(nameof(SenderContact))]
|
||||
public partial MailCopy MailCopy { get; set; } = mailCopy;
|
||||
|
||||
@@ -191,10 +191,14 @@ public partial class MailItemViewModel(MailCopy mailCopy) : ObservableRecipient,
|
||||
set => SetProperty(MailCopy.UniqueId, value, MailCopy, (u, n) => u.UniqueId = n);
|
||||
}
|
||||
|
||||
public string Base64ContactPicture
|
||||
public Guid? ContactPictureFileId
|
||||
{
|
||||
get => MailCopy.SenderContact?.Base64ContactPicture ?? string.Empty;
|
||||
set => SetProperty(MailCopy.SenderContact.Base64ContactPicture, value, MailCopy, (u, n) => u.SenderContact.Base64ContactPicture = n);
|
||||
get => MailCopy.SenderContact?.ContactPictureFileId;
|
||||
set => SetProperty(MailCopy.SenderContact?.ContactPictureFileId, value, MailCopy, (u, n) =>
|
||||
{
|
||||
if (u.SenderContact != null)
|
||||
u.SenderContact.ContactPictureFileId = n;
|
||||
});
|
||||
}
|
||||
|
||||
public DateTime SortingDate => CreationDate;
|
||||
@@ -236,7 +240,7 @@ public partial class MailItemViewModel(MailCopy mailCopy) : ObservableRecipient,
|
||||
nameof(FileId) => MailCopyChangeFlags.FileId,
|
||||
nameof(FolderId) => MailCopyChangeFlags.FolderId,
|
||||
nameof(UniqueId) => MailCopyChangeFlags.UniqueId,
|
||||
nameof(Base64ContactPicture) or nameof(SenderContact) => MailCopyChangeFlags.SenderContact,
|
||||
nameof(ContactPictureFileId) or nameof(SenderContact) => MailCopyChangeFlags.SenderContact,
|
||||
_ => MailCopyChangeFlags.None
|
||||
};
|
||||
}
|
||||
@@ -398,7 +402,7 @@ public partial class MailItemViewModel(MailCopy mailCopy) : ObservableRecipient,
|
||||
|
||||
if ((changedFlags & MailCopyChangeFlags.SenderContact) != 0)
|
||||
{
|
||||
Queue(nameof(Base64ContactPicture));
|
||||
Queue(nameof(ContactPictureFileId));
|
||||
Queue(nameof(SenderContact));
|
||||
}
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ public partial class ThreadMailItemViewModel : ObservableRecipient, IMailListIte
|
||||
/// </summary>
|
||||
public Guid UniqueId => latestMailViewModel?.UniqueId ?? Guid.Empty;
|
||||
|
||||
public string Base64ContactPicture => latestMailViewModel?.MailCopy?.SenderContact?.Base64ContactPicture ?? string.Empty;
|
||||
public Guid? ContactPictureFileId => latestMailViewModel?.MailCopy?.SenderContact?.ContactPictureFileId;
|
||||
|
||||
public bool ThumbnailUpdatedEvent => latestMailViewModel?.ThumbnailUpdatedEvent ?? false;
|
||||
|
||||
@@ -188,7 +188,7 @@ public partial class ThreadMailItemViewModel : ObservableRecipient, IMailListIte
|
||||
[NotifyPropertyChangedFor(nameof(FileId))]
|
||||
[NotifyPropertyChangedFor(nameof(FolderId))]
|
||||
[NotifyPropertyChangedFor(nameof(UniqueId))]
|
||||
[NotifyPropertyChangedFor(nameof(Base64ContactPicture))]
|
||||
[NotifyPropertyChangedFor(nameof(ContactPictureFileId))]
|
||||
[NotifyPropertyChangedFor(nameof(SenderContact))]
|
||||
public partial ObservableCollection<MailItemViewModel> ThreadEmails { get; set; } = [];
|
||||
|
||||
@@ -369,7 +369,7 @@ public partial class ThreadMailItemViewModel : ObservableRecipient, IMailListIte
|
||||
Queue(nameof(FileId));
|
||||
Queue(nameof(FolderId));
|
||||
Queue(nameof(UniqueId));
|
||||
Queue(nameof(Base64ContactPicture));
|
||||
Queue(nameof(ContactPictureFileId));
|
||||
Queue(nameof(SenderContact));
|
||||
Queue(nameof(ThumbnailUpdatedEvent));
|
||||
Queue(nameof(SortingDate));
|
||||
@@ -433,7 +433,7 @@ public partial class ThreadMailItemViewModel : ObservableRecipient, IMailListIte
|
||||
|
||||
if ((changedFlags & MailCopyChangeFlags.SenderContact) != 0)
|
||||
{
|
||||
Queue(nameof(Base64ContactPicture));
|
||||
Queue(nameof(ContactPictureFileId));
|
||||
Queue(nameof(SenderContact));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user