add visibility for loaded mods size for pair, use menu bar for settings, remove settings button

This commit is contained in:
rootdarkarchon
2023-11-16 15:57:23 +01:00
parent c196cdd344
commit 96cc64b35a
6 changed files with 21 additions and 18 deletions

View File

@@ -37,6 +37,7 @@ public sealed class PairHandler : DisposableMediatorSubscriberBase
private bool _isVisible;
private string _penumbraCollection;
private bool _redrawOnNextApplication = false;
public long LastAppliedDataSize { get; private set; }
public PairHandler(ILogger<PairHandler> logger, OnlineUserIdentDto onlineUser,
GameObjectHandlerFactory gameObjectHandlerFactory,
@@ -81,6 +82,8 @@ public sealed class PairHandler : DisposableMediatorSubscriberBase
_redrawOnNextApplication = true;
}
});
LastAppliedDataSize = -1;
}
public bool IsVisible
@@ -398,6 +401,12 @@ public sealed class PairHandler : DisposableMediatorSubscriberBase
if (updateModdedPaths)
{
await _ipcManager.PenumbraSetTemporaryModsAsync(Logger, _applicationId, _penumbraCollection, moddedPaths).ConfigureAwait(false);
LastAppliedDataSize = -1;
foreach (var path in moddedPaths.Select(v => new FileInfo(v.Value)).Where(p => p.Exists))
{
if (path.Exists)
LastAppliedDataSize += path.Length;
}
}
if (updateManip)

View File

@@ -44,6 +44,7 @@ public class Pair
public bool IsVisible => CachedPlayer?.IsVisible ?? false;
public CharacterData? LastReceivedCharacterData { get; set; }
public string? PlayerName => CachedPlayer?.PlayerName ?? string.Empty;
public long LastAppliedDataSize => CachedPlayer?.LastAppliedDataSize ?? -1;
public UserData UserData => UserPair.User;