Skip to content
This repository was archived by the owner on Jun 21, 2023. It is now read-only.

Commit ade3b5f

Browse files
Ensuring the first load is never cached
1 parent e9395e8 commit ade3b5f

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

src/GitHub.App/ViewModels/Dialog/Clone/RepositorySelectViewModel.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class RepositorySelectViewModel : ViewModelBase, IRepositorySelectViewMod
3535
ICollectionView itemsView;
3636
ObservableAsPropertyHelper<RepositoryModel> repository;
3737
IRepositoryItemViewModel selectedItem;
38+
static bool firstLoad = true;
3839

3940
[ImportingConstructor]
4041
public RepositorySelectViewModel(IRepositoryCloneService service, IGitHubContextService gitHubContextService)
@@ -119,7 +120,11 @@ public void Initialize(IConnection connection)
119120
IsEnabled = true;
120121
}
121122

122-
public async Task Activate() => this.LoadItems(false);
123+
public async Task Activate()
124+
{
125+
await this.LoadItems(firstLoad);
126+
firstLoad = false;
127+
}
123128

124129
static string GroupName(KeyValuePair<string, IReadOnlyList<RepositoryListItemModel>> group, int max)
125130
{

src/GitHub.App/ViewModels/GitHubPane/IssueListViewModelBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ public async Task InitializeAsync(LocalRepositoryModel repository, IConnection c
166166
AuthorFilter.WhenAnyValue(x => x.Selected).Skip(1).SelectUnit())
167167
.Subscribe(_ => FilterChanged());
168168

169-
await InitializeItemSource(false);
169+
await InitializeItemSource(true);
170170
}
171171
catch (Exception ex)
172172
{

0 commit comments

Comments
 (0)