Fix remaining activity tracker related bugs

This commit is contained in:
pizzaboxer 2024-09-04 17:47:58 +01:00
parent f0ffdbc50c
commit 2805263a63
No known key found for this signature in database
GPG Key ID: 59D4A1DBAD0F2BA8
3 changed files with 12 additions and 5 deletions

View File

@ -125,7 +125,6 @@ namespace Bloxstrap.Integrations
}
}
// 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";
@ -142,7 +141,17 @@ namespace Bloxstrap.Integrations
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)
{

View File

@ -36,8 +36,7 @@ namespace Bloxstrap.UI.ViewModels.ContextMenu
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
{

View File

@ -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