Skip to content

Commit 694924f

Browse files
committed
Use cached online list. Fixes #98
1 parent 1a02079 commit 694924f

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

AvaGui/ViewModels/FolderTreeViewModel.cs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
using Avalonia.Controls;
33
using Dat;
44
using OpenLoco.Dat.Data;
5-
using OpenLoco.Definitions.DTO;
65
using OpenLoco.Definitions.Web;
76
using ReactiveUI;
87
using ReactiveUI.Fody.Helpers;
@@ -160,8 +159,6 @@ async Task LoadObjDirectoryAsync(string directory, bool useExistingIndex)
160159
FileLocation.Local);
161160
}
162161

163-
readonly IEnumerable<DtoObjectIndexEntry>? cachedIndexFromServer;
164-
165162
async Task LoadOnlineDirectoryAsync(bool useExistingIndex)
166163
{
167164
if (Design.IsDesignMode)
@@ -170,7 +167,7 @@ async Task LoadOnlineDirectoryAsync(bool useExistingIndex)
170167
return;
171168
}
172169

173-
if (!useExistingIndex || cachedIndexFromServer == null)
170+
if (!useExistingIndex || Model.ObjectIndexOnline == null)
174171
{
175172
Model.ObjectIndexOnline = new ObjectIndex()
176173
{

0 commit comments

Comments
 (0)