Search by regex, modal Enter fixes
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
using FileTime.Core.Models;
|
||||
|
||||
namespace FileTime.Core.Behaviors;
|
||||
|
||||
public interface IItemNameConverterProvider
|
||||
{
|
||||
Task<IEnumerable<ItemNamePart>> GetItemNamePartsAsync(IItem item);
|
||||
}
|
||||
@@ -26,4 +26,6 @@ public interface IItem
|
||||
ReadOnlyExtensionCollection Extensions { get; }
|
||||
|
||||
T? GetExtension<T>() => (T?)Extensions.FirstOrDefault(i => i is T);
|
||||
|
||||
IItem WithParent(AbsolutePath parent);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
namespace FileTime.Core.Models;
|
||||
|
||||
public record ItemNamePart(string Text, bool IsSpecial = false);
|
||||
@@ -90,4 +90,5 @@ public abstract class ContentProviderBase : IContentProvider
|
||||
|
||||
public abstract bool CanHandlePath(NativePath path);
|
||||
public bool CanHandlePath(FullName path) => CanHandlePath(GetNativePath(path));
|
||||
public IItem WithParent(AbsolutePath parent) => this;
|
||||
}
|
||||
@@ -84,4 +84,5 @@ public class RootContentProvider : IRootContentProvider
|
||||
public bool CanHandlePath(NativePath path) => throw new NotImplementedException();
|
||||
|
||||
public bool CanHandlePath(FullName path) => throw new NotImplementedException();
|
||||
public IItem WithParent(AbsolutePath parent) => this;
|
||||
}
|
||||
@@ -45,15 +45,19 @@ public record Container(
|
||||
_isLoading.OnNext(true);
|
||||
IsLoaded = false;
|
||||
}
|
||||
|
||||
public void StopLoading()
|
||||
{
|
||||
_isLoading.OnNext(false);
|
||||
IsLoaded = true;
|
||||
}
|
||||
|
||||
public void CancelLoading()
|
||||
{
|
||||
_loadingCancellationTokenSource.Cancel();
|
||||
_isLoading.OnNext(false);
|
||||
IsLoaded = true;
|
||||
}
|
||||
|
||||
public IItem WithParent(AbsolutePath parent) => this with {Parent = parent};
|
||||
}
|
||||
@@ -24,4 +24,6 @@ public record Element(
|
||||
ReadOnlyExtensionCollection Extensions) : IElement
|
||||
{
|
||||
public AbsolutePathType Type => AbsolutePathType.Element;
|
||||
|
||||
public IItem WithParent(AbsolutePath parent) => this with { Parent = parent };
|
||||
}
|
||||
Reference in New Issue
Block a user