mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-30 16:22:39 +00:00
Fix regression: restore pie-chart during attachment uploading
This commit is contained in:
parent
f02f82b066
commit
e4e2cfa99a
1 changed files with 2 additions and 4 deletions
|
@ -2112,16 +2112,14 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
|
|||
[tmpCachedAttachments addObject:cacheFilePath];
|
||||
}
|
||||
|
||||
// Define a unique upload id (reuse the local event id)
|
||||
[localEvent.content setValue:localEvent.eventId forKey:kRoomMessageUploadIdKey];
|
||||
|
||||
// Prepare event content
|
||||
NSMutableDictionary *info = [[NSMutableDictionary alloc] init];
|
||||
[info setValue:@"image/jpeg" forKey:@"mimetype"];
|
||||
[info setValue:[NSNumber numberWithUnsignedInteger:(NSUInteger)image.size.width] forKey:@"w"];
|
||||
[info setValue:[NSNumber numberWithUnsignedInteger:(NSUInteger)image.size.height] forKey:@"h"];
|
||||
[info setValue:[NSNumber numberWithUnsignedInteger:imageData.length] forKey:@"size"];
|
||||
localEvent.content = @{@"msgtype":@"m.image", @"url":dummyURL, @"info":info};
|
||||
localEvent.content = @{@"msgtype":@"m.image", @"url":dummyURL, @"info":info, kRoomMessageUploadIdKey:localEvent.eventId};
|
||||
// Note: we have defined here an upload id with the local event id
|
||||
|
||||
// Add this new event
|
||||
[self addLocalEchoEvent:localEvent];
|
||||
|
|
Loading…
Reference in a new issue