-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
19 changed files
with
284 additions
and
131 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace CurvaLauncher; | ||
|
||
public interface IAsyncMenuQueryResult : IQueryResult | ||
{ | ||
public Task<IEnumerable<IQueryResult>> GetMenuItemsAsync(CancellationToken cancellationToken); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace CurvaLauncher; | ||
|
||
public interface ISyncMenuQueryResult : IQueryResult | ||
{ | ||
public IEnumerable<IQueryResult> GetMenuItems(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using CommunityToolkit.Mvvm.ComponentModel; | ||
|
||
namespace CurvaLauncher.Models.ImmediateResults | ||
{ | ||
public partial class MenuResult : ImmediateResult | ||
{ | ||
[ObservableProperty] | ||
private int _selectedIndex; | ||
|
||
[ObservableProperty] | ||
private QueryResultModel? _selectedItem; | ||
|
||
public IReadOnlyList<QueryResultModel> Items { get; } | ||
|
||
public MenuResult(PluginInstance pluginInstance, IReadOnlyList<IQueryResult> items) | ||
{ | ||
Items = items | ||
.Select(item => new QueryResultModel(pluginInstance, item)) | ||
.OrderByDescending(item => item.Weight) | ||
.ToArray(); | ||
} | ||
} | ||
} |
14 changes: 0 additions & 14 deletions
14
src/CurvaLauncher/Models/ImmediateResults/SubResultListResult.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.