Skip to content

Commit 4515468

Browse files
committed
misc cleanup for 4.0.0
1 parent af5f4ad commit 4515468

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Dat/ObjectIndex.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,13 @@ public static async Task<ObjectIndex> LoadOrCreateIndexAsync(string directory, I
4747
ObjectIndex? index = null;
4848
if (File.Exists(indexPath))
4949
{
50+
logger.Info("Index file found - loading it");
5051
index = await LoadIndexAsync(indexPath).ConfigureAwait(false);
5152
}
5253

5354
if (index == null)
5455
{
56+
logger.Info("Index file not found - creating it");
5557
index = await CreateIndexAsync(directory, logger, progress).ConfigureAwait(false);
5658
await index.SaveIndexAsync(indexPath).ConfigureAwait(false);
5759
}

Definitions/Web/Client.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static async Task<IEnumerable<DtoObjectIndexEntry>> GetObjectListAsync(Ht
2828
{
2929
try
3030
{
31-
route = string.Join(Version, route);
31+
route = string.Concat(Version, route);
3232
logger?.Debug($"Querying {client.BaseAddress}{route}");
3333
using var response = await client.GetAsync(route);
3434

Gui/ViewModels/FolderTreeViewModel.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ public class FolderTreeViewModel : ReactiveObject
5959
[Reactive]
6060
public int SelectedTabIndex { get; set; }
6161

62-
public string RecreateText => SelectedTabIndex == 0 ? "Recreate index" : "Download object list";
62+
public bool IsLocal => SelectedTabIndex == 0;
63+
public string RecreateText => IsLocal ? "Recreate index" : "Download object list";
6364

6465
public string DirectoryFileCount
6566
=> $"Objects: {DirectoryItems.Sum(CountNodes)}";
@@ -94,7 +95,7 @@ public FolderTreeViewModel(ObjectEditorModel model)
9495
Progress.ProgressChanged += (_, progress) => IndexOrDownloadProgress = progress;
9596

9697
RefreshDirectoryItems = ReactiveCommand.Create(() => ReloadDirectoryAsync(false));
97-
OpenCurrentFolder = ReactiveCommand.Create(() => PlatformSpecific.FolderOpenInDesktop(CurrentLocalDirectory));
98+
OpenCurrentFolder = ReactiveCommand.Create(() => PlatformSpecific.FolderOpenInDesktop(IsLocal ? CurrentLocalDirectory : Model.Settings.DownloadFolder));
9899

99100
_ = this.WhenAnyValue(o => o.CurrentLocalDirectory)
100101
.Skip(1)

0 commit comments

Comments
 (0)