Top navigation, search delete
This commit is contained in:
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user