Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix crash when deleting device in OmemoKeysView
In this commit, we create a fallback/default value for the fingerprint when no data is retrieved from the database. This is needed to prevent crashes when removing a device from the list. The order of operations without this fallback is: * User clicks on the delete button to remove a device * The device gets removed from the DB * A notification is sent to the view * The view picks up the notification, via the ObservableObject * SwiftUI decides to recreate the view, while playing the animation * self.fingerprint is now empty, as there is no such device in the DB * We call signalHexKeyWithSpaces with this empty fingerprint * This function assumes the result is more than 2 characters long * This causes the crash
- Loading branch information