diff --git a/Riot/Modules/Communities/Home/GroupHomeViewController.m b/Riot/Modules/Communities/Home/GroupHomeViewController.m index 8f2563729..247b49521 100644 --- a/Riot/Modules/Communities/Home/GroupHomeViewController.m +++ b/Riot/Modules/Communities/Home/GroupHomeViewController.m @@ -516,8 +516,6 @@ // Check whether the provided URL is a valid Matrix Content URI. if (cacheFilePath) { - localSourcePath = [NSString stringWithFormat:@"file://%@", cacheFilePath]; - // Download the thumbnail if it is not already stored in the cache. if (![[NSFileManager defaultManager] fileExistsAtPath:cacheFilePath]) { @@ -529,10 +527,15 @@ withMethod:MXThumbnailingMethodScale success:^(NSString *outputFilePath) { MXStrongifyAndReturnIfNil(self); - [self renderGroupLongDescription]; + [self refreshGroupLongDescription]; } failure:nil]; } + else + { + // Update the local path + localSourcePath = [NSString stringWithFormat:@"file://%@", cacheFilePath]; + } } } else @@ -545,8 +548,6 @@ // Check whether the provided URL is a valid Matrix Content URI. if (cacheFilePath) { - localSourcePath = [NSString stringWithFormat:@"file://%@", cacheFilePath]; - // Download the image if it is not already stored in the cache. if (![[NSFileManager defaultManager] fileExistsAtPath:cacheFilePath]) { @@ -556,10 +557,15 @@ inFolder:kMXMediaManagerDefaultCacheFolder success:^(NSString *outputFilePath) { MXStrongifyAndReturnIfNil(self); - [self renderGroupLongDescription]; + [self refreshGroupLongDescription]; } failure:nil]; } + else + { + // Update the local path + localSourcePath = [NSString stringWithFormat:@"file://%@", cacheFilePath]; + } } } return localSourcePath;