mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-05-01 13:46:57 +02:00
add_invite_rooms_section
Plug the join/reject button The join does not refresh properly the recents.
This commit is contained in:
@@ -40,6 +40,7 @@
|
||||
@end
|
||||
|
||||
@implementation RecentsDataSource
|
||||
@synthesize onRoomInvitationReject, onRoomInvitationAccept;
|
||||
|
||||
- (instancetype)init
|
||||
{
|
||||
@@ -217,13 +218,32 @@
|
||||
((MXKInterleavedRecentTableViewCell*)cell).userFlag.backgroundColor = [UIColor clearColor];
|
||||
}
|
||||
|
||||
// on invite cell, add listeners on accept / reject buttons
|
||||
if ([cell isKindOfClass:[InviteRecentTableViewCell class]])
|
||||
{
|
||||
InviteRecentTableViewCell* inviteRecentTableViewCell = (InviteRecentTableViewCell*)cell;
|
||||
|
||||
inviteRecentTableViewCell.onRejectClick = ^(){
|
||||
if (self.onRoomInvitationReject)
|
||||
{
|
||||
self.onRoomInvitationReject(roomData.roomDataSource.room);
|
||||
}
|
||||
};
|
||||
|
||||
inviteRecentTableViewCell.onJoinClick = ^(){
|
||||
if (self.onRoomInvitationAccept)
|
||||
{
|
||||
self.onRoomInvitationAccept(roomData.roomDataSource.room);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
return cell;
|
||||
}
|
||||
}
|
||||
return nil;
|
||||
}
|
||||
|
||||
|
||||
- (id<MXKRecentCellDataStoring>)cellDataAtIndexPath:(NSIndexPath *)indexPath
|
||||
{
|
||||
id<MXKRecentCellDataStoring> cellData = nil;
|
||||
|
||||
Reference in New Issue
Block a user