File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 55using System . Threading ;
66using System . Threading . Tasks ;
77
8+ using Avalonia ;
89using Avalonia . Threading ;
10+
911using CommunityToolkit . Mvvm . ComponentModel ;
1012
1113namespace SourceGit . ViewModels
@@ -157,6 +159,12 @@ public bool CanOpenRevisionFileWithDefaultEditor
157159 private set => SetProperty ( ref _canOpenRevisionFileWithDefaultEditor , value ) ;
158160 }
159161
162+ public Vector ScrollOffset
163+ {
164+ get => _scrollOffset ;
165+ set => SetProperty ( ref _scrollOffset , value ) ;
166+ }
167+
160168 public CommitDetail ( Repository repo , CommitDetailSharedData sharedData )
161169 {
162170 _repo = repo ;
@@ -355,6 +363,7 @@ private void Refresh()
355363 Children = null ;
356364 RevisionFileSearchFilter = string . Empty ;
357365 RevisionFileSearchSuggestion = null ;
366+ ScrollOffset = Vector . Zero ;
358367
359368 if ( _commit == null )
360369 return ;
@@ -640,5 +649,6 @@ private async Task SetViewingCommitAsync(Models.Object file)
640649 private string _revisionFileSearchFilter = string . Empty ;
641650 private List < string > _revisionFileSearchSuggestion = null ;
642651 private bool _canOpenRevisionFileWithDefaultEditor = false ;
652+ private Vector _scrollOffset = Vector . Zero ;
643653 }
644654}
Original file line number Diff line number Diff line change 1616 <TextBlock Classes =" tab_header" Text =" {DynamicResource Text.CommitDetail.Info}" />
1717 </TabItem .Header>
1818
19- <ScrollViewer HorizontalScrollBarVisibility =" Disabled" VerticalScrollBarVisibility =" Auto" >
19+ <ScrollViewer Offset = " {Binding ScrollOffset, Mode=TwoWay} " HorizontalScrollBarVisibility =" Disabled" VerticalScrollBarVisibility =" Auto" >
2020 <StackPanel Orientation =" Vertical" >
2121 <!-- Base Information -->
2222 <v : CommitBaseInfo Content =" {Binding Commit}"
You can’t perform that action at this time.
0 commit comments