diff --git a/BeWoPlanerChat/bewoplaner-chat-android/app/build.gradle b/BeWoPlanerChat/bewoplaner-chat-android/app/build.gradle index 5cee12a..9be1cb4 100644 --- a/BeWoPlanerChat/bewoplaner-chat-android/app/build.gradle +++ b/BeWoPlanerChat/bewoplaner-chat-android/app/build.gradle @@ -10,7 +10,7 @@ buildscript { } dependencies { - classpath 'io.fabric.tools:gradle:1.25.4' + classpath 'io.fabric.tools:gradle:1.28.0' } } @@ -89,7 +89,7 @@ dependencies { exclude group: 'com.android.support' } - implementation('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') { + implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') { transitive = true } diff --git a/BeWoPlanerChat/bewoplaner-chat-android/build.gradle b/BeWoPlanerChat/bewoplaner-chat-android/build.gradle index f70304d..0aab550 100644 --- a/BeWoPlanerChat/bewoplaner-chat-android/build.gradle +++ b/BeWoPlanerChat/bewoplaner-chat-android/build.gradle @@ -6,7 +6,7 @@ buildscript { google() } dependencies { - classpath 'com.android.tools.build:gradle:3.4.2' + classpath 'com.android.tools.build:gradle:4.0.1' classpath 'io.realm:realm-gradle-plugin:5.3.0' // NOTE: Do not place your application dependencies here; they belong diff --git a/BeWoPlanerChat/bewoplaner-chat-android/gradle/wrapper/gradle-wrapper.properties b/BeWoPlanerChat/bewoplaner-chat-android/gradle/wrapper/gradle-wrapper.properties index a0fbaad..c0d7638 100644 --- a/BeWoPlanerChat/bewoplaner-chat-android/gradle/wrapper/gradle-wrapper.properties +++ b/BeWoPlanerChat/bewoplaner-chat-android/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue May 14 14:34:33 CEST 2019 +#Fri Aug 07 14:18:13 CEST 2020 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-5.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip diff --git a/ChatController/ChatController.csproj b/ChatController/ChatController.csproj index 3db7b56..2fd8096 100644 --- a/ChatController/ChatController.csproj +++ b/ChatController/ChatController.csproj @@ -149,6 +149,7 @@ + diff --git a/ChatController/ChatKlassen/Contact.cs b/ChatController/ChatKlassen/Contact.cs index c8cb338..4c384e2 100644 --- a/ChatController/ChatKlassen/Contact.cs +++ b/ChatController/ChatKlassen/Contact.cs @@ -1,5 +1,4 @@ using System; -using System.Collections.Generic; using System.ComponentModel; using System.Drawing; using System.Windows.Media; @@ -65,11 +64,9 @@ namespace ChatController.ChatKlassen public DateTime TimeStamp { get; set; } - public int GroupId { get; set; } + public int GroupId { get; } - public int UserOid { get; set; } - - public string UserIdManage { get; set; } + public string UserIdManage { get; } public bool IsChatMessageInputGridVisible { get; } @@ -88,61 +85,65 @@ namespace ChatController.ChatKlassen IsChatMessageInputGridVisible = isChatMessageInputGridVisible; - AccentColorBrush = new BrushConverter().ConvertFromString($"#{accentColorBrushString}") as SolidColorBrush ?? new SolidColorBrush(Colors.Black); + if(accentColorBrushString == null) + { + if(pUserIdManage != null) + { + accentColorBrushString = "3B7799"; + } + else if(pOnlyEmployees && pUserCount > 2) + { + accentColorBrushString = "45993B"; + } + else + { + accentColorBrushString = "000000"; + } + } + + AccentColorBrush = new BrushConverter().ConvertFromString($"#{accentColorBrushString}") as SolidColorBrush; Image = image; } - private sealed class ContactEqualityComparer : IEqualityComparer + public override bool Equals(object obj) { - public bool Equals(Contact x, Contact y) + if(obj is Contact y) { - if(ReferenceEquals(x, y)) + if(ReferenceEquals(this, y)) { return true; } - if(x is null) + if(GetType() != y.GetType()) { return false; } - if(y is null) - { - return false; - } - - if(x.GetType() != y.GetType()) - { - return false; - } - - return x.Name == y.Name && - x.IsNewMessage == y.IsNewMessage && - Equals(x.ProfilePicture, y.ProfilePicture) && - x.TimeStamp.Equals(y.TimeStamp) && - x.GroupId == y.GroupId && - x.UserOid == y.UserOid && - x.UserIdManage == y.UserIdManage && - x.IsChatMessageInputGridVisible == y.IsChatMessageInputGridVisible; + return Name == y.Name && + IsNewMessage == y.IsNewMessage && + Equals(ProfilePicture, y.ProfilePicture) && + TimeStamp.Equals(y.TimeStamp) && + GroupId == y.GroupId && + UserIdManage == y.UserIdManage && + IsChatMessageInputGridVisible == y.IsChatMessageInputGridVisible; } - public int GetHashCode(Contact obj) + return false; + } + + public override int GetHashCode() + { + unchecked { - unchecked - { - var hashCode = obj.Name != null ? obj.Name.GetHashCode() : 0; + var hashCode = Name != null ? Name.GetHashCode() : 0; - hashCode = (hashCode * 397) ^ obj.IsNewMessage.GetHashCode(); - hashCode = (hashCode * 397) ^ (obj.ProfilePicture != null ? obj.ProfilePicture.GetHashCode() : 0); - hashCode = (hashCode * 397) ^ obj.TimeStamp.GetHashCode(); - hashCode = (hashCode * 397) ^ obj.GroupId; - hashCode = (hashCode * 397) ^ obj.UserOid; - hashCode = (hashCode * 397) ^ (obj.UserIdManage != null ? obj.UserIdManage.GetHashCode() : 0); - hashCode = (hashCode * 397) ^ obj.IsChatMessageInputGridVisible.GetHashCode(); + hashCode = (hashCode * 397) ^ (ProfilePicture != null ? ProfilePicture.GetHashCode() : 0); + hashCode = (hashCode * 397) ^ GroupId; + hashCode = (hashCode * 397) ^ (UserIdManage != null ? UserIdManage.GetHashCode() : 0); + hashCode = (hashCode * 397) ^ IsChatMessageInputGridVisible.GetHashCode(); - return hashCode; - } + return hashCode; } } diff --git a/ChatController/ChatMainControl.xaml b/ChatController/ChatMainControl.xaml index e36002d..a85ed94 100644 --- a/ChatController/ChatMainControl.xaml +++ b/ChatController/ChatMainControl.xaml @@ -66,6 +66,7 @@ +