RoomViewController: Conforms to ReactionsMenuViewModelCoordinatorDelegate.

This commit is contained in:
SBiOSoftWhare
2019-06-06 11:30:57 +02:00
parent 72a5f3bc25
commit e2c9de99e8
2 changed files with 36 additions and 9 deletions
@@ -594,19 +594,19 @@
- (void)bubbleReactionsViewModel:(BubbleReactionsViewModel *)viewModel didAddReaction:(MXReactionCount *)reactionCount forEventId:(NSString *)eventId
{
[self.mxSession.aggregations sendReaction:reactionCount.reaction toEvent:eventId inRoom:self.roomId success:^(NSString * _Nonnull eventId) {
[self addReaction:reactionCount.reaction forEventId:eventId success:^(NSString *eventId) {
} failure:^(NSError *error) {
} failure:^(NSError * _Nonnull error) {
NSLog(@"[MXKRoomDataSource] Fail to send reaction on eventId: %@", eventId);
}];
}
- (void)bubbleReactionsViewModel:(BubbleReactionsViewModel *)viewModel didRemoveReaction:(MXReactionCount * _Nonnull)reactionCount forEventId:(NSString * _Nonnull)eventId
{
[self.mxSession.aggregations unReactOnReaction:reactionCount.reaction toEvent:eventId inRoom:self.roomId success:^{
[self removeReaction:reactionCount.reaction forEventId:eventId success:^{
} failure:^(NSError *error) {
} failure:^(NSError * _Nonnull error) {
NSLog(@"[MXKRoomDataSource] Fail to unreact on eventId: %@", eventId);
}];
}