Commit Graph

9 Commits

Author SHA1 Message Date
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
Angelo Stavrow
e736ebbb8c
Add descriptive text to login view 2020-09-29 14:40:15 -04:00
Angelo Stavrow
0c20fea0e6
Refactor login/logout to implement WriteFreely package 2020-08-18 17:21:00 -04:00
Angelo Stavrow
6dba087295
Refactor account views and AccountModel 2020-08-11 16:27:14 -04:00
Angelo Stavrow
35f4762b35
Improve appearance of settings views between platforms 2020-08-10 14:30:23 -04:00
Angelo Stavrow
a7b918c14b
Refactor login view out of AccountView 2020-08-10 13:31:46 -04:00
Angelo Stavrow
4de5293345
Refactor logout view out of AccountView 2020-08-10 13:20:53 -04:00
Angelo Stavrow
4b914891b7
Adapt AccountView to embed in iOS SettingsView form 2020-08-10 12:38:06 -04:00
Angelo Stavrow
93a10e27dd
Rename Account and Settings views and move to Shared code 2020-08-10 10:39:44 -04:00