aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Source')
-rw-r--r--Source/SPTableContent.m10
-rw-r--r--Source/SPTableInfo.m6
2 files changed, 11 insertions, 5 deletions
diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m
index a03e17a7..de827982 100644
--- a/Source/SPTableContent.m
+++ b/Source/SPTableContent.m
@@ -2667,8 +2667,8 @@
maxNumRowsIsEstimate = NO;
[tableDataInstance setStatusValue:[NSString stringWithFormat:@"%ld", (long)maxNumRows] forKey:@"Rows"];
[tableDataInstance setStatusValue:@"y" forKey:@"RowsCountAccurate"];
- [tableInfoInstance tableChanged:nil];
- [[tableDocumentInstance valueForKey:@"extendedTableInfoInstance"] performSelectorOnMainThread:@selector(loadTable:) withObject:selectedTable waitUntilDone:YES];
+ [[tableInfoInstance onMainThread] tableChanged:nil];
+ [[[tableDocumentInstance valueForKey:@"extendedTableInfoInstance"] onMainThread] loadTable:selectedTable];
// Otherwise, if the table status value is accurate, use it
} else if ([[tableDataInstance statusValueForKey:@"RowsCountAccurate"] boolValue]) {
@@ -2686,8 +2686,8 @@
maxNumRowsIsEstimate = NO;
[tableDataInstance setStatusValue:[NSString stringWithFormat:@"%ld", (long)maxNumRows] forKey:@"Rows"];
[tableDataInstance setStatusValue:@"y" forKey:@"RowsCountAccurate"];
- [tableInfoInstance tableChanged:nil];
- [[tableDocumentInstance valueForKey:@"extendedTableInfoInstance"] performSelectorOnMainThread:@selector(loadTable:) withObject:selectedTable waitUntilDone:YES];
+ [[tableInfoInstance onMainThread] tableChanged:nil];
+ [[[tableDocumentInstance valueForKey:@"extendedTableInfoInstance"] onMainThread] loadTable:selectedTable];
// Use the estimate count
} else {
@@ -2719,7 +2719,7 @@
}
[tableDataInstance setStatusValue:[NSString stringWithFormat:@"%ld", (long)maxNumRows] forKey:@"Rows"];
[tableDataInstance setStatusValue:maxNumRowsIsEstimate?@"n":@"y" forKey:@"RowsCountAccurate"];
- [tableInfoInstance tableChanged:nil];
+ [[tableInfoInstance onMainThread] tableChanged:nil];
}
}
diff --git a/Source/SPTableInfo.m b/Source/SPTableInfo.m
index e44e8194..00db406e 100644
--- a/Source/SPTableInfo.m
+++ b/Source/SPTableInfo.m
@@ -67,6 +67,12 @@
[super dealloc];
}
+/**
+ * Notification to indicate the table has changed and that the table info requires
+ * reloading for display. This is called on table changes, and also (with a nil argument)
+ * during certain refresh operations to trigger a data update.
+ * This function is not thread-safe.
+ */
- (void)tableChanged:(NSNotification *)notification
{
NSDictionary *tableStatus;