Top navigation, search delete

This commit is contained in:
2023-07-28 17:10:50 +02:00
parent ee42e38e45
commit ed6864e127
27 changed files with 320 additions and 149 deletions

View File

@@ -52,7 +52,7 @@ public abstract partial class ItemViewModel : IItemViewModel
var displayName = itemViewModelType switch
{
ItemViewModelType.Main => _appState.RapidTravelText.Map(s => (IReadOnlyList<ItemNamePart>) _itemNameConverterService.GetDisplayName(item.DisplayName, s)),
_ => new DeclarativeProperty<IReadOnlyList<ItemNamePart>>(new List<ItemNamePart> {new (item.DisplayName)}),
_ => new DeclarativeProperty<IReadOnlyList<ItemNamePart>>(new List<ItemNamePart> {new(item.DisplayName)}),
};
BaseItem = item;
@@ -103,6 +103,6 @@ public abstract partial class ItemViewModel : IItemViewModel
var deepestPath = _parentTab.Tab.LastDeepestSelectedPath;
var commonPath = FullName.CreateSafe(PathHelper.GetCommonPath(ownFullName.Path, deepestPath.Path));
return commonPath.Path == ownFullName.Path;
return commonPath is not null && commonPath.Path == ownFullName.Path;
}
}

View File

@@ -198,7 +198,7 @@ public partial class TabViewModel : ITabViewModel
private static async Task<IItem> MapItemAsync(AbsolutePath item)
=> await item.ResolveAsync(forceResolve: true,
itemInitializationSettings: new ItemInitializationSettings(true));
itemInitializationSettings: new ItemInitializationSettings {SkipChildInitialization = true});
private IItemViewModel MapItemToViewModel(IItem item, ItemViewModelType type)
{