1using CommunityToolkit.Mvvm.ComponentModel;
2using CommunityToolkit.Mvvm.Input;
34 private readonly TaskCompletionSource<PresenceRequestAction> result =
new();
47 this.BareJid = BareJid;
48 this.FriendlyName = FriendlyName;
49 this.PhotoUrl = PhotoUrl;
50 this.PhotoWidth = PhotoWidth;
51 this.PhotoHeight = PhotoHeight;
52 this.HasFriendlyName = !
string.IsNullOrEmpty(FriendlyName) && FriendlyName != BareJid;
53 this.HasPhoto = !
string.IsNullOrEmpty(PhotoUrl);
55 if (this.hasFriendlyName)
57 this.PrimaryName = FriendlyName;
58 this.SecondaryName =
" (" + BareJid +
")";
62 this.PrimaryName = BareJid;
63 this.SecondaryName =
string.Empty;
71 private string bareJid;
77 private string friendlyName;
83 private string primaryName;
89 private string secondaryName;
95 private bool hasFriendlyName;
101 private bool hasPhoto;
107 private string? photoUrl;
113 private int photoWidth;
119 private int photoHeight;
124 public Task<PresenceRequestAction>
Result => this.result.Task;
130 private async Task Accept()
140 private async Task Reject()
147 private async Task Ignore()
156 internal void Close()
Base class that references services in the app.
static IPopupService PopupService
Popup service for presenting application popups.
A base class for all view models, inheriting from the BindableObject. NOTE: using this class requir...