JLWeChat-iPhone icon indicating copy to clipboard operation
JLWeChat-iPhone copied to clipboard

Message thread does not reload on sometime.

Open koolahmedkhan opened this issue 9 years ago • 0 comments

The mesage thread does not reload sometime. I figure out that in IMChatC.m the following code does not get called when user send or recieve any new message :+1: @weakify(self); [self.viewModel.fetchLaterSignal subscribeNext:^(id x) { @strongify(self); dispatch_async(dispatch_get_main_queue(), ^{ [self.tableView reloadData]; if ([self isNearbyBottom]) { [self scrollToBottomAnimated:YES]; } }); }];

    [self.viewModel.fetchEarlierSignal subscribeNext:^(NSIndexPath *indexPath) {
        @strongify(self);
        dispatch_async(dispatch_get_main_queue(), ^{
            [self.tableView reloadData];
            if (indexPath) {
                [self.tableView scrollToRowAtIndexPath:indexPath
                                      atScrollPosition:UITableViewScrollPositionTop animated:NO];
            }
            else {
                [self scrollToBottomAnimated:YES];
            }
        });
    }];

What should I do to handle it ?

koolahmedkhan avatar May 27 '15 06:05 koolahmedkhan