parley-messaging / ios-library

Parley iOS app library
MIT License
2 stars 2 forks source link

Calling clearChat on background thread causes a crash #141

Open nlamah opened 3 months ago

nlamah commented 3 months ago

Describe the Bug When the function didReceiveMessages in ParleyView is called from background thread it causes a crash Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.

Steps To Reproduce Call on Parley.shared the function purgeLocalMemory from background thread. Actual result: The app crashes with the message Modifications to the layout engine must not be performed from a background thread after it has been accessed from the main thread.

Expected behaviour The public functions on Parley.swift could be called from background thread or if should be made clear that there should be called from the mainThread.

Screenshots NA