Skip to content

two messages crash #32

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 24, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Antidote/ChatPrivateController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -707,13 +707,20 @@ private extension ChatPrivateController {
case .initial:
break
case .update(_, let deletions, let insertions, let modifications):

// TODO: this is a very bad workaround. when more than 1 message is incoming
// those would crash.
/*
tableView.beginUpdates()
self.updateTableViewWithDeletions(deletions)
self.updateTableViewWithInsertions(insertions)
self.updateTableViewWithModifications(modifications)

self.visibleMessages = self.visibleMessages + insertions.count - deletions.count
tableView.endUpdates()
*/
// now just reload the whole table to avoid the crash, until there is a fix
tableView.reloadData()

self.updateTableHeaderView()

Expand Down