Skip to content

Commit

Permalink
Fixed another bug(2) where detailed page does not update accurately w…
Browse files Browse the repository at this point in the history
…hen switching from one connection to another.
  • Loading branch information
Ashfaaq18 committed Jan 31, 2022
1 parent 83c125f commit e7b34f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
4 changes: 0 additions & 4 deletions Models/FileIO.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ public static void ReadFile(ref DataUsageSummaryVM dusvm_ref, ref DataUsageDetai
}
else
{
foreach (var row in dudvm_ref.OnProfVM.MyProcesses.ToList())
{
dudvm_ref.OnProfVM.MyProcesses.Remove(row.Key);
}
File.Create(completePath);
DateTime dateTime = File.GetCreationTime(completePath);
dusvm_ref.TotalUsageText = "Total data usage of the past " + (DateTime.Now.DayOfYear - dateTime.DayOfYear).ToString() + " days";
Expand Down
8 changes: 7 additions & 1 deletion Models/NetworkInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,14 @@ private void SetNetworkStatus(bool isOnline)

dusvm.CurrentSessionDownloadData = 0;
dusvm.CurrentSessionUploadData = 0;

dusvm.TotalDownloadData = 0;
dusvm.TotalUploadData = 0;
dudvm.CurrentConnection = "";

foreach (var row in dudvm.OnProfVM.MyProcesses.ToList())
{
dudvm.OnProfVM.MyProcesses.Remove(row.Key);
}
}
}

Expand Down

0 comments on commit e7b34f6

Please sign in to comment.