@@ -12,6 +12,12 @@ namespace SourceGit.ViewModels
12
12
{
13
13
public class BranchCompare : ObservableObject
14
14
{
15
+ public bool IsLoading
16
+ {
17
+ get => _isLoading ;
18
+ private set => SetProperty ( ref _isLoading , value ) ;
19
+ }
20
+
15
21
public Models . Branch Base
16
22
{
17
23
get => _based ;
@@ -101,6 +107,8 @@ public void NavigateTo(string commitSHA)
101
107
public void Swap ( )
102
108
{
103
109
( Base , To ) = ( _to , _based ) ;
110
+
111
+ VisibleChanges = [ ] ;
104
112
SelectedChanges = [ ] ;
105
113
106
114
if ( _baseHead != null )
@@ -166,6 +174,7 @@ public ContextMenu CreateChangeContextMenu()
166
174
await App . CopyTextAsync ( change . Path ) ;
167
175
ev . Handled = true ;
168
176
} ;
177
+ menu . Items . Add ( new MenuItem ( ) { Header = "-" } ) ;
169
178
menu . Items . Add ( copyPath ) ;
170
179
171
180
var copyFullPath = new MenuItem ( ) ;
@@ -184,6 +193,8 @@ public ContextMenu CreateChangeContextMenu()
184
193
185
194
private void Refresh ( )
186
195
{
196
+ IsLoading = true ;
197
+
187
198
Task . Run ( async ( ) =>
188
199
{
189
200
if ( _baseHead == null )
@@ -221,6 +232,7 @@ private void Refresh()
221
232
Dispatcher . UIThread . Post ( ( ) =>
222
233
{
223
234
VisibleChanges = visible ;
235
+ IsLoading = false ;
224
236
225
237
if ( VisibleChanges . Count > 0 )
226
238
SelectedChanges = [ VisibleChanges [ 0 ] ] ;
@@ -253,6 +265,7 @@ private void RefreshVisible()
253
265
}
254
266
255
267
private string _repo ;
268
+ private bool _isLoading = true ;
256
269
private Models . Branch _based = null ;
257
270
private Models . Branch _to = null ;
258
271
private Models . Commit _baseHead = null ;
0 commit comments