Commit Graph

23 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
2f1b895df5
Rename 'persistentContainer' to 'container' 2021-10-08 17:15:38 -04:00
Angelo Stavrow
11ad3bc2ff
Use LocalStorageManager 'standard' singleton 2021-10-08 17:07:06 -04:00
Angelo Stavrow
735867a940
Add new-post logic to toolbar button and menu, fix broken iOS code 2020-11-25 14:41:53 -05:00
Angelo Stavrow
889faf9351
Don't extract lede if the incoming string is empty 2020-11-10 15:21:21 -05:00
Angelo Stavrow
c32c67040f
Fix the lede extractor for edge cases 2020-11-09 14:56:03 -05:00
Angelo Stavrow
cd6f8adbbb
Don't return more than the first line on short titleless posts 2020-11-06 16:51:41 -05:00
Angelo Stavrow
d989709319
Include punctuation in first-sentence lede 2020-11-06 15:58:41 -05:00
Angelo Stavrow
62e3c9aa0e
Don't elide ledes that are shorter than 80 characters 2020-11-06 15:48:02 -05:00
Angelo Stavrow
2d911cf0d6
Update lede on new posts as user types 2020-11-06 14:39:46 -05:00
Angelo Stavrow
00bd18463e
Add function to strip Markdown-formatted images 2020-11-06 14:01:33 -05:00
Angelo Stavrow
60ce0868ca
Add function to strip Markdown formatting for headings 2020-11-06 10:20:33 -05:00
Angelo Stavrow
3799a0e792
Create extractLede function on PostListModel 2020-11-05 16:49:08 -05:00
Angelo Stavrow
e7408a47e9
Fix crash-on-load bug by cleaning up/thread-sanitizing CoreData calls 2020-10-29 16:09:35 -04:00
Angelo Stavrow
932da4ac48
Purge everything except local posts on logout 2020-10-22 12:40:07 -04:00
Angelo Stavrow
edec5e9087
Delete local post via swipe 2020-09-17 11:29:24 -04:00
Angelo Stavrow
bc7ac18a7e
Extend NSManagedObjectContext to update context after batch delete 2020-09-10 14:08:29 -04:00
Angelo Stavrow
c6f108c172
Clean up imports on PostListModel 2020-09-10 10:10:46 -04:00
Angelo Stavrow
dad0fef7f1
Rename PersistenceManager to LocalStorageManager 2020-09-09 14:19:40 -04:00
Angelo Stavrow
300d4f30b4
Use FetchedResults<WFAPost> for filtering the post list 2020-09-09 10:56:23 -04:00
Angelo Stavrow
12723fbaea
Restore updateFromServer functionality when remote copy is newer 2020-09-08 17:29:55 -04:00
Angelo Stavrow
ca8e74b2dc
Replace Post type with WFAPost managed object 2020-09-08 16:17:58 -04:00
Angelo Stavrow
6728e20821
Rename PostStore to PostListModel and move to PostList group 2020-09-08 11:29:13 -04:00