Skip to content

Commit

Permalink
Fix remaining activity tracker related bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzaboxer committed Sep 4, 2024
1 parent f0ffdbc commit 2805263
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
13 changes: 11 additions & 2 deletions Bloxstrap/Integrations/ActivityWatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,6 @@ public async void Start()
}
}

// TODO: i need to double check how this handles failed game joins (connection error, invalid permissions, etc)
private void ReadLogEntry(string entry)
{
const string LOG_IDENT = "ActivityWatcher::ReadLogEntry";
Expand All @@ -142,7 +141,17 @@ private void ReadLogEntry(string entry)
App.Logger.WriteLine(LOG_IDENT, $"Read {_logEntriesRead} log entries");

if (entry.Contains(GameLeavingEntry))
OnAppClose?.Invoke(this, new EventArgs());
{
App.Logger.WriteLine(LOG_IDENT, "User is back into the desktop app");

OnAppClose?.Invoke(this, EventArgs.Empty);

if (Data.PlaceId != 0 && !InGame)
{
App.Logger.WriteLine(LOG_IDENT, "User appears to be leaving from a cancelled/errored join");
Data = new();
}
}

if (!InGame && Data.PlaceId == 0)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ private async void LoadData()

if (entries.Any())
{
// TODO: this will duplicate universe ids
string universeIds = String.Join(',', entries.Select(x => x.UniverseId));
string universeIds = String.Join(',', entries.GroupBy(x => x.UniverseId).Select(x => x.First()));

try
{
Expand Down
1 change: 0 additions & 1 deletion Bloxstrap/UI/ViewModels/Installer/WelcomeViewModel.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
namespace Bloxstrap.UI.ViewModels.Installer
{
// TODO: administrator check?
public class WelcomeViewModel : NotifyPropertyChangedViewModel
{
// formatting is done here instead of in xaml, it's just a bit easier
Expand Down

0 comments on commit 2805263

Please sign in to comment.