We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 53b1a2f commit f00b159Copy full SHA for f00b159
src/Views/ViewLogs.axaml.cs
@@ -1,5 +1,6 @@
1
using Avalonia.Controls;
2
using Avalonia.Input;
3
+using Avalonia.Interactivity;
4
5
namespace SourceGit.Views
6
{
@@ -11,6 +12,12 @@ public ViewLogs()
11
12
InitializeComponent();
13
}
14
15
+ private void OnLoaded(object sender, RoutedEventArgs e)
16
+ {
17
+ if (DataContext is ViewModels.ViewLogs vm && vm.Logs.Count > 0)
18
+ vm.SelectedLog = vm.Logs[0];
19
+ }
20
+
21
private void OnLogContextRequested(object sender, ContextRequestedEventArgs e)
22
23
if (sender is not Grid { DataContext: ViewModels.CommandLog log } grid || DataContext is not ViewModels.ViewLogs vm)
0 commit comments