summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MobileCydia.mm12
1 files changed, 10 insertions, 2 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm
index 6555d3c..4b0fb36 100644
--- a/MobileCydia.mm
+++ b/MobileCydia.mm
@@ -2620,11 +2620,19 @@ struct PackageNameOrdering :
}
- (BOOL) hasMode {
+@synchronized (database_) {
+ if ([database_ era] != era_ || iterator_.end())
+ return nil;
+
pkgDepCache::StateCache &state([database_ cache][iterator_]);
return state.Mode != pkgDepCache::ModeKeep;
-}
+} }
- (NSString *) mode {
+@synchronized (database_) {
+ if ([database_ era] != era_ || iterator_.end())
+ return nil;
+
pkgDepCache::StateCache &state([database_ cache][iterator_]);
switch (state.Mode) {
@@ -2656,7 +2664,7 @@ struct PackageNameOrdering :
}
_nodefault
}
-}
+} }
- (NSString *) id {
return id_;