From 5e1341d7e039707fe3b740456d8742e698b83991 Mon Sep 17 00:00:00 2001 From: Danmei Chen Date: Tue, 5 Mar 2019 14:40:28 +0100 Subject: [PATCH] fix crash of refresh data in ChatConversationView --- Classes/ChatConversationView.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Classes/ChatConversationView.m b/Classes/ChatConversationView.m index dedea872a..e9871972e 100644 --- a/Classes/ChatConversationView.m +++ b/Classes/ChatConversationView.m @@ -141,6 +141,8 @@ static UICompositeViewDescription *compositeDescription = nil; - (void)refreshData { [_tableController refreshData]; [refreshControl endRefreshing]; + if (_tableController.totalNumberOfItems == 0) + return; [_tableController loadData]; [_tableController.tableView scrollToRowAtIndexPath:[NSIndexPath indexPathForRow:_tableController.currentIndex inSection:0] atScrollPosition:UITableViewScrollPositionTop