Skip to content

Commit 3ae16f1

Browse files
committed
Auto-fetch on by default (1 min) and fetch on repository open, matching Fork
1 parent a4ae633 commit 3ae16f1

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/ViewModels/Preferences.cs‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -251,13 +251,13 @@ public bool EnableAutoFetch
251251
{
252252
get;
253253
set;
254-
} = false;
254+
} = true;
255255

256256
public int AutoFetchInterval
257257
{
258258
get;
259259
set;
260-
} = 10;
260+
} = 1;
261261

262262
public bool IgnoreWhitespaceChangesInDiff
263263
{

‎src/ViewModels/Repository.cs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ public void Open()
449449
_workingCopy = new WorkingCopy(this) { CommitMessage = _uiStates.LastCommitMessage };
450450
_stashesPage = new StashesPage(this);
451451
_selectedViewIndex = Preferences.Instance.ShowLocalChangesByDefault ? 1 : 0;
452-
_lastFetchTime = DateTime.Now;
452+
_lastFetchTime = DateTime.MinValue; // fetch on open, so remote state is fresh from the start
453453
_autoFetchTimer = new Timer(AutoFetchByTimer, null, 5000, 5000);
454454
RefreshAll();
455455
}

‎src/Views/Preferences.axaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@
429429
CornerRadius="3"
430430
ParsingNumberStyle="Integer"
431431
FormatString="0"
432-
Value="{Binding AutoFetchInterval, Mode=TwoWay, FallbackValue=10}"
432+
Value="{Binding AutoFetchInterval, Mode=TwoWay, FallbackValue=1}"
433433
IsEnabled="{Binding #AutoFetchCheckBox.IsChecked}"/>
434434

435435
<TextBlock VerticalAlignment="Center"

0 commit comments

Comments
 (0)