The cache size did not include the media one (it was only the Matrix SDK one)

This commit is contained in:
ylecollen
2015-01-09 17:14:09 +01:00
parent 25d36367de
commit 4ec4be80e3
5 changed files with 54 additions and 2 deletions
@@ -658,6 +658,7 @@ NSString* const kCommandsDescriptionText = @"The following commands are availabl
if (self.tableView == aTableView) {
// tap on clear application cache
if ((indexPath.section == SETTINGS_SECTION_ROOMS_INDEX) && (indexPath.row == SETTINGS_SECTION_ROOMS_CLEAR_CACHE_INDEX)) {
// clear caches
[[MatrixHandler sharedHandler] forceInitialSync:YES];
}
@@ -807,7 +808,7 @@ NSString* const kCommandsDescriptionText = @"The following commands are availabl
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ClearCacheCell"];
}
cell.textLabel.text = [NSString stringWithFormat:@"Clear cache (%@)", [NSByteCountFormatter stringFromByteCount:[MatrixHandler sharedHandler].MXCacheSize countStyle:NSByteCountFormatterCountStyleFile]];
cell.textLabel.text = [NSString stringWithFormat:@"Clear cache (%@)", [NSByteCountFormatter stringFromByteCount:[MatrixHandler sharedHandler].cachesSize countStyle:NSByteCountFormatterCountStyleFile]];
;
cell.textLabel.textAlignment = NSTextAlignmentCenter;
cell.textLabel.textColor = [AppDelegate theDelegate].masterTabBarController.tabBar.tintColor;