From 7d25cac6ca68badda1272c61f0be05cdb920b813 Mon Sep 17 00:00:00 2001 From: LynJet <104435916+LynJet@users.noreply.github.com> Date: Fri, 27 May 2022 11:50:37 +0200 Subject: [PATCH] Kontaktliste wird bei neuer Nachricht aktualisiert Text ist markierbar --- ChatController/ChatController.csproj | 2 + ChatController/ChatKlassen/ChatMessage.cs | 2 +- ChatController/ChatKlassen/Contact.cs | 8 +- ChatController/ChatMainControl.xaml | 20 +++-- ChatController/ChatMainControl.xaml.cs | 15 ++-- ChatController/Core/FlowDocumentExtensions.cs | 79 ++++++++++++++++++ ChatController/Core/OwnChatCache.cs | 8 ++ ChatController/Core/OwnChatRichTextBox.cs | 50 +++++++++++ ChatController/HauptKlassen/Chat.cs | 15 ++-- ChatController/LoginControl.xaml.cs | 12 --- ChatController/Utilities/Utils.cs | 22 ++++- PrototypChat/.vs/PrototypChat/v16/.suo | Bin 286720 -> 278016 bytes 12 files changed, 192 insertions(+), 41 deletions(-) create mode 100644 ChatController/Core/FlowDocumentExtensions.cs create mode 100644 ChatController/Core/OwnChatRichTextBox.cs diff --git a/ChatController/ChatController.csproj b/ChatController/ChatController.csproj index 39970db..104c59d 100644 --- a/ChatController/ChatController.csproj +++ b/ChatController/ChatController.csproj @@ -71,7 +71,9 @@ + + diff --git a/ChatController/ChatKlassen/ChatMessage.cs b/ChatController/ChatKlassen/ChatMessage.cs index 7fc0259..b556226 100644 --- a/ChatController/ChatKlassen/ChatMessage.cs +++ b/ChatController/ChatKlassen/ChatMessage.cs @@ -18,7 +18,7 @@ namespace ChatController.ChatKlassen public int TimeStringMaxWidth => IsSeparator ? int.MaxValue : 350; - public int MessageMaxWidth => IsSeparator ? int.MaxValue : 500; + public int MessageMaxWidth => IsSeparator ? int.MaxValue : 450; public string SeparatorTimeString => SendTime.ToString("dd. MMMM yyyy"); diff --git a/ChatController/ChatKlassen/Contact.cs b/ChatController/ChatKlassen/Contact.cs index 941c20c..3a0346b 100644 --- a/ChatController/ChatKlassen/Contact.cs +++ b/ChatController/ChatKlassen/Contact.cs @@ -94,9 +94,11 @@ namespace ChatController.ChatKlassen IsChatMessageInputGridVisible = isChatMessageInputGridVisible; - if(accentColorBrushString == null) + Utils.DownloadUserProfilePicturesAsync(userId2Uri); + + if (accentColorBrushString is null) { - if(pUserIdManage != null) + if(!(pUserIdManage is null)) { accentColorBrushString = "3B7799"; } @@ -114,7 +116,7 @@ namespace ChatController.ChatKlassen IsGroupChat = pUserCount > 2; - Utils.DownloadProfilePictureAsync(profilePicturePath, key, delegate(ImageSource imageSource) + Utils.DownloadGroupProfilePictureAsync(profilePicturePath, key, delegate(ImageSource imageSource) { Image = imageSource; }); diff --git a/ChatController/ChatMainControl.xaml b/ChatController/ChatMainControl.xaml index 5a7c57d..2a0aef2 100644 --- a/ChatController/ChatMainControl.xaml +++ b/ChatController/ChatMainControl.xaml @@ -68,7 +68,7 @@ - + + - + @@ -149,7 +150,7 @@ - +