awkward / beam

Beam: the open source Reddit client for iOS
https://beamreddit.com
GNU General Public License v2.0
269 stars 37 forks source link

Fix crash on switching accounts #47

Closed robinspeijer closed 4 years ago

robinspeijer commented 4 years ago

When switching accounts, we accessed the main (view) Core Data context from a background thread. I've tidied up the appropriate method a little bit with some extra explanation and added an async to fix.

I'm not really happy with this fix, but I guess this is the best we could do for now without refactoring the authentication and Core Data stack.