mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-18 00:54:19 +00:00
DirectoryContentsList: Fix a bug in isStillLoading
This commit is contained in:
parent
eb80465aa9
commit
68ad0ef3d8
2 changed files with 3 additions and 3 deletions
|
|
@ -103,7 +103,7 @@ void DirectoryContentsList::refresh()
|
|||
|
||||
if (root.isDirectory())
|
||||
{
|
||||
fileFindHandle = std::make_unique<RangedDirectoryIterator>(root, false, "*", fileTypeFlags);
|
||||
fileFindHandle = std::make_unique<RangedDirectoryIterator> (root, false, "*", fileTypeFlags);
|
||||
shouldStop = false;
|
||||
isSearching = true;
|
||||
thread.addTimeSliceClient (this);
|
||||
|
|
@ -215,6 +215,7 @@ bool DirectoryContentsList::checkNextFile (bool& hasChanged)
|
|||
}
|
||||
|
||||
fileFindHandle = nullptr;
|
||||
isSearching = false;
|
||||
|
||||
if (! wasEmpty && files.isEmpty())
|
||||
hasChanged = true;
|
||||
|
|
|
|||
|
|
@ -201,8 +201,7 @@ private:
|
|||
OwnedArray<FileInfo> files;
|
||||
|
||||
std::unique_ptr<RangedDirectoryIterator> fileFindHandle;
|
||||
std::atomic<bool> shouldStop { true };
|
||||
bool isSearching = false;
|
||||
std::atomic<bool> shouldStop { true }, isSearching { false };
|
||||
|
||||
bool wasEmpty = true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue