Skip to content

Commit 5cf6072

Browse files
committed
Fix display of empty folder TextState
1 parent bcfbe74 commit 5cf6072

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

Files UWP/Filesystem/ItemViewModel.cs

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ public async void AddItemsToCollectionAsync(string path, Page currentPage)
7878
stopwatch.Start();
7979

8080
PVIS.isVisible = Visibility.Visible;
81-
TextState.isVisible = Visibility.Collapsed;
8281

8382
switch (Universal.path)
8483
{
@@ -169,7 +168,7 @@ public async void AddItemsToCollectionAsync(string path, Page currentPage)
169168
const uint step = 250;
170169
BasicProperties basicProperties;
171170
StorageFolderQueryResult folderQueryResult = folder.CreateFolderQueryWithOptions(options);
172-
uint NumItems = await folderQueryResult.GetItemCountAsync();
171+
uint NumFolItems = await folderQueryResult.GetItemCountAsync();
173172
IReadOnlyList<StorageFolder> storageFolders = await folderQueryResult.GetFoldersAsync(index, step);
174173
while (storageFolders.Count > 0)
175174
{
@@ -251,7 +250,7 @@ public async void AddItemsToCollectionAsync(string path, Page currentPage)
251250
return;
252251
}
253252
itemName = file.DisplayName;
254-
SetAsFriendlyDate(basicProperties.ItemDate.LocalDateTime);
253+
SetAsFriendlyDate(basicProperties.DateModified.LocalDateTime);
255254
itemPath = file.Path;
256255
if (ByteSize.FromBytes(basicProperties.Size).KiloBytes < 1)
257256
{
@@ -346,7 +345,10 @@ public async void AddItemsToCollectionAsync(string path, Page currentPage)
346345
index += step;
347346
storageFiles = await fileQueryResult.GetFilesAsync(index, step);
348347
}
349-
348+
if (NumFolItems + NumFileItems == 0)
349+
{
350+
TextState.isVisible = Visibility.Visible;
351+
}
350352
stopwatch.Stop();
351353
Debug.WriteLine("Loading of items in " + Universal.path + " completed in " + stopwatch.Elapsed.Seconds + " seconds.\n");
352354

Launcher/Program.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ private static void Main(string[] args)
1010
{
1111
try
1212
{
13-
var executable = (string) ApplicationData.Current.LocalSettings.Values["executable"];
13+
var executable = (string) ApplicationData.Current.LocalSettings.Values["Application"];
1414
Process.Start(executable);
1515
}
1616
catch (Exception e)

0 commit comments

Comments
 (0)