Closed hakeemsyd closed 6 years ago
@hakeemsyd additionally: need a ChatSpotClient method to load older messages. a method where frontend can say “load messages older than this messageID” like we could do with twitter. twitter example for reference:
TwitterClient.sharedInstance.homeTimeline(maxID: tweets[tweets.count - 1].id!, success: { (tweets: [Tweet]) in
self.isMoreDataLoading = false self.tweets.append(contentsOf: tweets.dropFirst())
self.tableView.reloadData()
self.loadingMoreView.stopAnimating()
}, failure: { (error: Error) in
print("Could not find tweets: \(error.localizedDescription)")
KRProgressHUD.set(font: .systemFont(ofSize: 15))
KRProgressHUD.showError(withMessage: "Unable to load tweets.")
self.isMoreDataLoading = false self.loadingMoreView.stopAnimating()
})
Try out FUIDataSource from sample app given by google firebase