diff options
Diffstat (limited to 'MobileCydia.mm')
-rw-r--r-- | MobileCydia.mm | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/MobileCydia.mm b/MobileCydia.mm index b53372b..728b550 100644 --- a/MobileCydia.mm +++ b/MobileCydia.mm @@ -7643,7 +7643,8 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { /* }}} */ /* Source Controller {{{ */ @interface SourceController : FilteredPackageListController { - Source *source_; + _transient Source *source_; + NSString *uri_; } - (id) initWithDatabase:(Database *)database source:(Source *)source; @@ -7658,11 +7659,27 @@ bool DepSubstrate(const pkgCache::VerIterator &iterator) { - (id) initWithDatabase:(Database *)database source:(Source *)source { source_ = source; + uri_ = [source uri]; if ((self = [super initWithDatabase:database title:[source label] filter:@selector(isVisibleInSource:) with:source]) != nil) { } return self; } +- (void) reloadData { + NSArray *sources = [database_ sources]; + for (Source *source in sources) { + if ([[source uri] isEqual:uri_]) { + source_ = source; + uri_ = [source uri]; + break; + } + } + + [self setObject:source_]; + + [super reloadData]; +} + @end /* }}} */ /* Sources Controller {{{ */ |