]> git.saurik.com Git - cydia.git/commitdiff
Always use popErrorWithTitle: for list.ReadMainList().
authorJay Freeman (saurik) <saurik@saurik.com>
Mon, 21 Feb 2011 14:14:20 +0000 (06:14 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Mon, 21 Feb 2011 15:03:49 +0000 (07:03 -0800)
MobileCydia.mm

index c29e9ffbde82df41f38d6e284636e0d9a3d7cd8d..1cd2894fe9693d100fbf45120c43f01f18417297 100644 (file)
@@ -3745,12 +3745,11 @@ static NSString *Warning_;
 }
 
 - (void) updateWithStatus:(Status &)status {
-    _transient NSObject<ProgressDelegate> *delegate(status.getDelegate());
     NSString *title(UCLocalize("REFRESHING_DATA"));
 
     pkgSourceList list;
-    if (!list.ReadMainList())
-        [delegate _setProgressError:@"Unable to read source list." withTitle:title];
+    if ([self popErrorWithTitle:title forOperation:list.ReadMainList()])
+        return;
 
     FileFd lock;
     lock.Fd(GetLock(_config->FindDir("Dir::State::Lists") + "lock"));
@@ -8293,7 +8292,7 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) {
     [super reloadData];
 
     pkgSourceList list;
-    if (!list.ReadMainList())
+    if ([database_ popErrorWithTitle:UCLocalize("SOURCES") forOperation:list.ReadMainList()])
         return;
 
     [sources_ removeAllObjects];