This commit is contained in:
Waldi
2017-10-24 12:22:05 +02:00
parent 82defcb751
commit c29d09e59b
2 changed files with 15 additions and 12 deletions

View File

@@ -87,13 +87,14 @@ namespace ChatController.HauptKlassen
Kontaktliste.Add(new KontaktlistBuilder(value.Name, AvatarToImageSourceConverter(value.Avatar),
message, timeformated, value.Oid, null));
if(lastMS != null && lastMS.Timestamp != null && lastMS.Timestamp.Date != null) {
TimeSpan span = (DateTime.Parse(lastMS.Timestamp.Date) - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc));
long unixTime = System.Convert.ToInt64(span.TotalSeconds);
TimeSpan span = (DateTime.Parse(lastMS.Timestamp.Date) - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc));
long unixTime = System.Convert.ToInt64(span.TotalSeconds);
if (lastTimeStamp < unixTime)
{
lastTimeStamp = unixTime;
if (lastTimeStamp < unixTime)
{
lastTimeStamp = unixTime;
}
}
}
}
@@ -683,12 +684,14 @@ namespace ChatController.HauptKlassen
Kontakt.Add(new KontaktlistBuilder(value.Name, AvatarToImageSourceConverter(value.Avatar),
message, timeformated, value.Oid, null));
TimeSpan span = (DateTime.Parse(lastMS.Timestamp.Date) - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc));
long unixTime = System.Convert.ToInt64(span.TotalSeconds);
if (lastMS != null && lastMS.Timestamp != null && lastMS.Timestamp.Date != null) {
TimeSpan span = (DateTime.Parse(lastMS.Timestamp.Date) - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc));
long unixTime = System.Convert.ToInt64(span.TotalSeconds);
if (lastTimeStamp < unixTime)
{
lastTimeStamp = unixTime;
if (lastTimeStamp < unixTime)
{
lastTimeStamp = unixTime;
}
}
}

View File

@@ -114,7 +114,7 @@ namespace ChatController
}
catch (Exception exception)
{
MessageBox.Show("Fehler:"+exception.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
MessageBox.Show("Fehler: " + exception.Message, "Fehler", MessageBoxButton.OK, MessageBoxImage.Error);
Cursor = Cursors.Arrow;
}
}