Go to location, Warnings

This commit is contained in:
2022-02-01 13:32:38 +01:00
parent 9824184d90
commit 45ec3ae0b3
10 changed files with 72 additions and 34 deletions

View File

@@ -9,7 +9,7 @@ namespace FileTime.Core.Command
private Func<IContainer, string, Task<IContainer>>? _createContainer;
private TimeRunner? _timeRunner;
public IList<AbsolutePath>? Sources { get; } = new List<AbsolutePath>();
public IList<AbsolutePath> Sources { get; } = new List<AbsolutePath>();
public IContainer? Target { get; set; }

View File

@@ -4,7 +4,7 @@ namespace FileTime.Core.Command
{
public interface ITransportationCommand : ICommand
{
IList<AbsolutePath>? Sources { get; }
IList<AbsolutePath> Sources { get; }
IContainer? Target { get; set;}
TransportMode? TransportMode { get; set; }
}

View File

@@ -5,7 +5,7 @@ namespace FileTime.Core.Command
{
public class MoveCommand : ITransportationCommand
{
public IList<AbsolutePath>? Sources { get; } = new List<AbsolutePath>();
public IList<AbsolutePath> Sources { get; } = new List<AbsolutePath>();
public IContainer? Target { get; set; }
public TransportMode? TransportMode { get; set; } = Command.TransportMode.Merge;

View File

@@ -6,7 +6,9 @@ namespace FileTime.Core.Components
public class Tab
{
private IItem? _currentSelectedItem;
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
private IContainer _currentLocation;
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
private string? _lastPath;
public int CurrentSelectedIndex { get; private set; }

View File

@@ -12,14 +12,18 @@ namespace FileTime.Core.Providers
private readonly IReadOnlyList<IItem>? _items;
private readonly IReadOnlyList<IElement>? _elements = new List<IElement>().AsReadOnly();
#pragma warning disable CS8603 // Possible null reference return.
public string Name => null;
#pragma warning restore CS8603 // Possible null reference return.
public string? FullName => null;
public bool IsHidden => false;
public bool IsLoaded => true;
#pragma warning disable CS8603 // Possible null reference return.
public IContentProvider Provider => null;
#pragma warning restore CS8603 // Possible null reference return.
public bool CanDelete => false;
public bool CanRename => false;

View File

@@ -74,7 +74,7 @@ namespace FileTime.Core.Timeline
}
});
UpdateReadOnlyCommands();
await UpdateReadOnlyCommands();
}
public async Task TryStartCommandRunner()