mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-29 04:36:58 +02:00
MediaAlbumContentViewController: Fix some retain cycle issues.
This commit is contained in:
@@ -89,11 +89,15 @@
|
||||
self.mediaTypes = @[(NSString *)kUTTypeImage];
|
||||
}
|
||||
|
||||
MXWeakify(self);
|
||||
|
||||
// Observe UIApplicationWillEnterForegroundNotification to refresh captures collection when app leaves the background state.
|
||||
UIApplicationWillEnterForegroundNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:UIApplicationWillEnterForegroundNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
|
||||
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
// Force a full refresh of the displayed collection
|
||||
self.assetsCollection = _assetsCollection;
|
||||
self.assetsCollection = self->_assetsCollection;
|
||||
|
||||
}];
|
||||
|
||||
@@ -105,6 +109,8 @@
|
||||
// Observe user interface theme change.
|
||||
kThemeServiceDidChangeThemeNotificationObserver = [[NSNotificationCenter defaultCenter] addObserverForName:kThemeServiceDidChangeThemeNotification object:nil queue:[NSOperationQueue mainQueue] usingBlock:^(NSNotification *notif) {
|
||||
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
[self userInterfaceThemeDidChange];
|
||||
|
||||
}];
|
||||
|
||||
Reference in New Issue
Block a user