Fix showing potentially outdated message count when merging databases

This commit is contained in:
chylex 2022-03-21 14:01:43 +01:00
parent 6ce0ef7d55
commit 3b41ea7b5f
No known key found for this signature in database
GPG Key ID: 4DE42C8F19A80548

View File

@ -92,6 +92,8 @@ namespace DHT.Desktop.Main.Pages {
}
var oldStatistics = target.Statistics.Clone();
var oldMessageCount = target.CountMessages();
int successful = 0;
int finished = 0;
@ -132,7 +134,7 @@ namespace DHT.Desktop.Main.Pages {
var newStatistics = target.Statistics;
long newServers = newStatistics.TotalServers - oldStatistics.TotalServers;
long newChannels = newStatistics.TotalChannels - oldStatistics.TotalChannels;
long newMessages = newStatistics.TotalMessages - oldStatistics.TotalMessages;
long newMessages = target.CountMessages() - oldMessageCount;
StringBuilder message = new StringBuilder();
message.Append("Processed ");