mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-05-01 06:15:41 +08:00
ux: auto-focus commits list box and select the first commit on startup
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -129,9 +129,11 @@ namespace SourceGit.ViewModels
|
||||
|
||||
Task.Run(async () =>
|
||||
{
|
||||
var commits = await new Commands.QueryCommitsForInteractiveRebase(repoPath, on.SHA).GetResultAsync().ConfigureAwait(false);
|
||||
var list = new List<InteractiveRebaseItem>();
|
||||
var commits = await new Commands.QueryCommitsForInteractiveRebase(repoPath, on.SHA)
|
||||
.GetResultAsync()
|
||||
.ConfigureAwait(false);
|
||||
|
||||
var list = new List<InteractiveRebaseItem>();
|
||||
for (var i = 0; i < commits.Count; i++)
|
||||
{
|
||||
var c = commits[i];
|
||||
@@ -141,6 +143,8 @@ namespace SourceGit.ViewModels
|
||||
Dispatcher.UIThread.Post(() =>
|
||||
{
|
||||
Items.AddRange(list);
|
||||
if (list.Count > 0)
|
||||
SelectedItem = list[0];
|
||||
IsLoading = false;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user