mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-03 14:46:56 +02:00
The cache size did not include the media one (it was only the Matrix SDK one)
This commit is contained in:
@@ -22,6 +22,8 @@
|
||||
#import "MXFileStore.h"
|
||||
#import "MXTools.h"
|
||||
|
||||
#import "MediaManager.h"
|
||||
|
||||
NSString *const kMatrixHandlerUnsupportedMessagePrefix = @"UNSUPPORTED MSG: ";
|
||||
|
||||
static MatrixHandler *sharedHandler = nil;
|
||||
@@ -280,6 +282,9 @@ static MatrixHandler *sharedHandler = nil;
|
||||
[[AppDelegate theDelegate].masterTabBarController popRoomViewControllerAnimated:NO];
|
||||
|
||||
if (clearCache) {
|
||||
// clear the media cache
|
||||
[MediaManager clearCache];
|
||||
|
||||
[_mxFileStore deleteAllData];
|
||||
}
|
||||
|
||||
@@ -787,7 +792,7 @@ static MatrixHandler *sharedHandler = nil;
|
||||
return nil;
|
||||
}
|
||||
|
||||
-(NSUInteger) MXCacheSize {
|
||||
- (NSUInteger) MXCacheSize {
|
||||
|
||||
if (self.mxFileStore) {
|
||||
return self.mxFileStore.diskUsage;
|
||||
@@ -796,6 +801,10 @@ static MatrixHandler *sharedHandler = nil;
|
||||
return 0;
|
||||
}
|
||||
|
||||
- (NSUInteger) cachesSize {
|
||||
return self.MXCacheSize + [MediaManager cacheSize];
|
||||
}
|
||||
|
||||
- (CGFloat)getPowerLevel:(MXRoomMember *)roomMember inRoom:(MXRoom *)room {
|
||||
CGFloat powerLevel = 0;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user