This commit is contained in:
2023-08-22 17:03:02 +02:00
parent abbb6df66d
commit fa29ee9eaf
5 changed files with 11 additions and 11 deletions

View File

@@ -40,7 +40,7 @@ public static class Startup
services.TryAddSingleton<IRootViewModel, RootViewModel>();
services.TryAddSingleton<IDialogService, DialogService>();
services.TryAddSingleton<IUserCommunicationService>(sp => sp.GetRequiredService<IDialogService>());
services.TryAddSingleton<IUserCommandHandler, ConsoleUserCommandHandler>();
services.AddSingleton<IUserCommandHandler, ConsoleUserCommandHandler>();
services.AddSingleton<IStartupHandler, StartupHandler>();
services.TryAddSingleton<IThemeProvider, ThemeProvider>();

View File

@@ -67,6 +67,10 @@ public partial class BinaryView<T> : View<BinaryView<T>, T>, IDisplayView
if (data is null) return false;
var driver = renderContext.ConsoleDriver;
driver.ResetStyle();
SetStyleColor(renderContext, foreground, background);
var lineI = 0;
var textSize = size with {Height = 1};
for (var i = 0; i < data.Length; i += bytesPerLine, lineI++)

View File

@@ -112,14 +112,16 @@ public sealed partial class ItemsControl<TDataContext, TItem>
{
var neededRerender = false;
IReadOnlyList<IView> forceRerenderChildren;
IReadOnlyList<IView> children;
lock (_forceRerenderChildrenLock)
{
forceRerenderChildren = _forceRerenderChildren.ToList();
_forceRerenderChildren.Clear();
children = _children.ToList();
}
var delta = 0;
foreach (var child in _children)
foreach (var child in children)
{
if (!child.IsVisible) continue;

View File

@@ -396,13 +396,6 @@ public abstract partial class View<TConcrete, T> : IView<T> where TConcrete : Vi
}
}
protected void SetColorsForDriver(in RenderContext renderContext)
{
var foreground = Foreground ?? renderContext.Foreground;
var background = Background ?? renderContext.Background;
SetStyleColor(renderContext, foreground, background);
}
public TChild CreateChild<TChild>() where TChild : IView<T>, new()
{
var child = new TChild();

View File

@@ -69,6 +69,7 @@ public class DecompressCommand : CommandBase, IExecutableCommand, ITransportatio
foreach (var archiveContext in _archives)
{
await DecompressFile(archiveContext, resolvedTarget, contentWriterFactory, itemCreator);
await _commandSchedulerNotifier.RefreshContainer(Target);
}
}
@@ -81,7 +82,7 @@ public class DecompressCommand : CommandBase, IExecutableCommand, ITransportatio
var archive = archiveContext.Archive;
foreach (var archiveEntry in archive.Entries)
{
var subPath = string.Join(Constants.SeparatorChar, archiveEntry.Key.Split('\\'));
var subPath = archiveContext.TargetContainerName + Constants.SeparatorChar + string.Join(Constants.SeparatorChar, archiveEntry.Key.Split('\\'));
var entryPath = Target.GetChild(subPath);
if (archiveEntry.IsDirectory)