element-ios icon indicating copy to clipboard operation
element-ios copied to clipboard

Updating the RoomDataSource to exclude some message bubbles from rendering still leaves blank space

Open vishu1034 opened this issue 2 years ago • 0 comments

Steps to reproduce

I am working on a functionality to remove some messages from the data source or not render some messages based on event ids. First of all i cant find the point at which messages are added to the table datasource.

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
...
NSArray *DeletedEventsOfRoom = [[NSUserDefaults standardUserDefaults] objectForKey:@"DeletedEventsOfRoom"];
    if(DeletedEventsOfRoom){
        NSArray<MXEvent *> *bubbleEvents = roomBubbleCellData.events;
        for(MXEvent *tempEvent in bubbleEvents){
            if([DeletedEventsOfRoom containsObject:tempEvent.eventId]){
                UITableViewCell *cell = [UITableViewCell new];
                cell.hidden = YES;
                return cell;
            }
        }
    }
...

This hides the bubble but keeps the empty space of the bubble. Can anyone tell me from where can I just remove those messages from the room data source instead of hiding them from the UI.

Outcome

I am working on a functionality to remove some messages from the data source or not render some messages based on event ids. First of all i cant find the point at which messages are added to the table datasource.

This hides the bubble but keeps the empty space of the bubble. Can anyone tell me from where can I just remove those messages from the room data source instead of hiding them from the UI.

Your phone model

No response

Operating system version

No response

Application version

No response

Homeserver

No response

Will you send logs?

No

vishu1034 avatar Sep 03 '23 11:09 vishu1034