Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/xamarin/macdoc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremie Laval <jeremie.laval@gmail.com>2012-03-30 22:21:57 +0400
committerJeremie Laval <jeremie.laval@gmail.com>2012-03-30 22:21:57 +0400
commit3ba92d3eb4eb46ea044e08ab7a5ff3f0404cfcc9 (patch)
tree3689e98bec9b8311740b89f00a8ece359a640f4b /MyDocument.cs
parent6ac9385b120baf8ec91d27107907abed6f32e343 (diff)
[macdoc] Instantiate the index if it has been deemed fresh enough elsewhere.
This might still be subject to concurrent problem if index has been created but the property has not been sent and if subsequent event has already been fired.
Diffstat (limited to 'MyDocument.cs')
-rw-r--r--MyDocument.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/MyDocument.cs b/MyDocument.cs
index 530604b..28fd8e8 100644
--- a/MyDocument.cs
+++ b/MyDocument.cs
@@ -123,7 +123,7 @@ namespace macdoc
{
AppDelegate.IndexUpdateManager.UpdaterChange += ToggleSearchCreationStatus;
searchIndex = AppDelegate.Root.GetSearchIndex ();
- mdocSearch = new IndexSearcher (null);
+ mdocSearch = new IndexSearcher (AppDelegate.IndexUpdateManager.IsFresh ? AppDelegate.Root.GetIndex () : null);
indexResults.Source = new IndexDataSource (mdocSearch);
multipleMatchResults.Source = new MultipleMatchDataSource (this);
searchResults.Source = new ResultDataSource ();