swiftui-multiplatform/iOS
Angelo Stavrow a51bbd3abc
Alert on error: shared code (#207)
* Initial work on presenting alert on error

* Move Account-related error handling up the hierarchy

* Handle errors on logout

* Fix for temporary debugging

* Clean up WriteFreelyModel’s published vars

* Add error handling to top-level content view

* Set current error on API call failures

* Set current error on API call handlers

* Move User Defaults errors to ErrorConstants file

* Add default values for some error strings

* Handle purging post errors

* Add FIXME to track silent failure on fetching collections

As collections are fetched and added to the `list` property in the CollectionListModel’s initializer, it’s tricky to throw an error here: we call it as a property initializer in CollectionListView, which cannot throw.

Consider refactoring this logic such that we’re using, for example, a @FetchRequest in CollectionListView instead.

* Handle errors in (most) shared code

Two outliers to come back to are:

- the LocalStoreManager, where we can’t set a current error in the WriteFreelyModel in methods that can’t throw
- the CollectionListModel, where the initializer can’t throw because we use it as a property initializer in CollectionListView

* Add error handling to Mac app

* Revert "Add error handling to Mac app"

This reverts commit b1a8b8b29c.
2022-07-27 09:56:32 -04:00
..
Extensions Only ignore safe area at bottom edge (#206) 2022-04-02 08:07:03 -04:00
PostEditor Rename 'persistentContainer' to 'container' 2021-10-08 17:15:38 -04:00
Settings Alert on error: shared code (#207) 2022-07-27 09:56:32 -04:00
Info.plist Update change log and bump build number 2020-09-24 15:41:29 -04:00
LaunchScreen.storyboard Add blank launch screen storyboard for iPad multitasking requirements 2020-09-14 09:53:48 -04:00