Commit Graph

68 Commits

Author SHA1 Message Date
Angelo Stavrow
579db0c889
Add "Create Log Post" command to Post menu (#243) 2023-04-17 10:27:01 -04:00
Angelo Stavrow
040f398b0a
Fix crash-on-launch when post list is empty (#241)
* Apply a quarter-second delay to the dispatched call

* Update change log

* Fix nav-back bug when launching to last draft

* Improve keyboard present/dismiss animations

* Update change log and bump build number
2023-01-15 15:46:16 -05:00
Angelo Stavrow
64abea4333
Squashed commit of the following:
commit 804255b1da
Merge: a799fd6 d46eb63
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Sun Dec 18 15:28:10 2022 -0500

    Merge branch 'main' into fix-crash-on-launch-tmp-no-nav

commit a799fd6210
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Sun Dec 18 08:16:34 2022 -0500

    Bump build number and update change log

commit b81276d629
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Sun Dec 18 08:16:16 2022 -0500

    Only navigate to new/last draft on launch on macOS

    This is causing the app to crash on launch when there are no existing posts, so we’re going to remove it for now while we investigate.
2022-12-29 09:40:27 -05:00
Angelo Stavrow
9b2a849071
Revert "Don't navigate to new/last draft on launch (#238)" (#239)
This reverts commit f4ba5f9a90.
2022-12-29 09:25:36 -05:00
Angelo Stavrow
f4ba5f9a90
Don't navigate to new/last draft on launch (#238)
* Only navigate to new/last draft on launch on macOS

This is causing the app to crash on launch when there are no existing posts, so we’re going to remove it for now while we investigate.

* Bump build number and update change log
2022-12-29 09:06:31 -05:00
Angelo Stavrow
1361ff7586
Write logs to new post (#236) 2022-12-06 16:41:12 -05:00
Angelo Stavrow
884da073e9
Prepare release v1.0.11 for iOS (#225)
* Add error handling to Mac app

* Log fatal crashes and present alert on next launch

* Update crash alert copy and navigate to help forum

* Refactor logging into reuseable methods

* Refactor class to use protocol

* Add environment object to settings window

* Improve deactivation of app when miniaturizing

* Chagne dispatch type when creating new post

* Bump version and build number

* Remove unnecessary TODO comment

* Update change log

* Log fatal crashes and present alert on next launch

* Update crash alert copy and navigate to help forum

* Refactor logging into reuseable methods

* Add environment object to settings window

* Improve deactivation of app when miniaturizing

* Chagne dispatch type when creating new post

* Improve default window size (#220)

* Clean up unnecessary import

* Set idealWidth property on sidebars

* Unset selected post on collection change (#218)

* Unset selected post when changing collection

* Update change log

* Bump build number and update change log
2022-09-10 08:30:55 -04:00
Angelo Stavrow
dbcb18b1df
Fix bad merges (#215)
* Alert on error: shared code

commit 00e6fabe1dad243eb49d5ffdd9695bda287b8b53
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Thu Jul 28 07:16:22 2022 -0400

    Replace CollectionListModel with FetchRequest in CollectionListView

    commit d54b9471ba9da5d22c904bbb38a555529d3c15a5
    Author: Angelo Stavrow <contact@angelostavrow.com>
    Date:   Thu Jul 28 07:13:13 2022 -0400

        Add error handling to iOS post editor

        commit b48fde47147572fe78379c2bd76430f474ac4822
        Author: Angelo Stavrow <contact@angelostavrow.com>
        Date:   Wed Jul 27 12:13:06 2022 -0400

            Add error handling to macOS

            commit 695da810854414620035005b83d9c366669f96ff
            Author: Angelo Stavrow <contact@angelostavrow.com>
            Date:   Wed Jul 27 12:00:34 2022 -0400

                Log fatal errors and present alert on next launch

                commit 2017a5b437
                Author: Angelo Stavrow <contact@angelostavrow.com>
                Date:   Sun Jul 24 06:22:29 2022 -0400

                    Clean up todo comment

                commit 669e07ecd9
                Merge: efe173c b93e0c3
                Author: Angelo Stavrow <contact@angelostavrow.com>
                Date:   Sat Jun 25 12:08:17 2022 -0400

                    Merge branch 'show-downloadable-logs' into log-localstore-errors

                commit b93e0c3547
                Author: Angelo Stavrow <contact@angelostavrow.com>
                Date:   Sat Jun 25 12:07:38 2022 -0400

                    Refactor class to use protocol

                commit 9b2572ba41
                Author: Angelo Stavrow <contact@angelostavrow.com>
                Date:   Sat Jun 25 11:17:44 2022 -0400

                    Refactor logging into reuseable methods

                commit efe173cfca
                Author: Angelo Stavrow <contact@angelostavrow.com>
                Date:   Fri Jun 24 08:40:10 2022 -0400

                    Update crash alert copy and navigate to help forum

                commit 5a1b400333
                Author: Angelo Stavrow <contact@angelostavrow.com>
                Date:   Sat Jun 18 08:53:25 2022 -0400

                    Log fatal crashes and present alert on next launch

            commit f1b0a20643
            Author: Angelo Stavrow <contact@angelostavrow.com>
            Date:   Wed Jul 27 11:42:05 2022 -0400

                Revert "Log fatal errors and present alert on next launch (#212)"

                This reverts commit 7475b57772.

            commit 7475b57772
            Author: Angelo Stavrow <contact@angelostavrow.com>
            Date:   Wed Jul 27 09:47:06 2022 -0400

                Log fatal errors and present alert on next launch (#212)

                * Log fatal crashes and present alert on next launch

                * Update crash alert copy and navigate to help forum

                * Refactor logging into reuseable methods

                * Refactor class to use protocol

                * Clean up todo comment

            commit a43bd801a8
            Author: Angelo Stavrow <contact@angelostavrow.com>
            Date:   Tue May 31 07:35:40 2022 -0400

                Add error handling to Mac app

        commit a315b09553
        Author: Angelo Stavrow <contact@angelostavrow.com>
        Date:   Tue May 31 06:51:40 2022 -0400

            Cleanup

        commit 7863c2ba08
        Author: Angelo Stavrow <contact@angelostavrow.com>
        Date:   Sat May 28 09:23:16 2022 -0400

            Add error handling to post editor

    commit 2eba4c5c04
    Author: Angelo Stavrow <contact@angelostavrow.com>
    Date:   Sat May 28 07:22:27 2022 -0400

        Remove commented-out code

    commit 230f7a1076
    Author: Angelo Stavrow <contact@angelostavrow.com>
    Date:   Sat May 28 07:17:33 2022 -0400

        Delete CollectionListModel in favour of FetchRequest in CollectionListView

commit fd37a163b9
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Tue May 31 07:36:43 2022 -0400

    Revert "Add error handling to Mac app"

    This reverts commit b1a8b8b29c.

commit b1a8b8b29c
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Tue May 31 07:23:41 2022 -0400

    Add error handling to Mac app

commit 15f84b04c0
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Thu May 26 08:08:12 2022 -0400

    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

commit c5b611b39e
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Thu May 26 07:31:11 2022 -0400

    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.

commit b017e21e06
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Mon May 23 15:52:20 2022 -0400

    Handle purging post errors

commit 11d2e41ab5
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Mon May 23 15:12:33 2022 -0400

    Add default values for some error strings

commit dfb3a08608
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Fri May 13 08:44:13 2022 -0400

    Move User Defaults errors to ErrorConstants file

commit 223ebf5b7c
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Fri May 13 08:33:32 2022 -0400

    Set current error on API call handlers

commit faa557c2b4
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Fri May 13 08:01:11 2022 -0400

    Set current error on API call failures

commit a3b805a319
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Fri May 13 07:20:47 2022 -0400

    Add error handling to top-level content view

commit 3a53bec184
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Mon May 9 08:55:43 2022 -0400

    Clean up WriteFreelyModel’s published vars

commit aefcd0d799
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Sun May 8 10:18:21 2022 -0400

    Fix for temporary debugging

commit bf35738957
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Sun May 8 09:17:05 2022 -0400

    Handle errors on logout

commit 01ba57ae75
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Sun May 8 09:16:46 2022 -0400

    Move Account-related error handling up the hierarchy

commit 11200a01a0
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Sun May 1 12:06:36 2022 -0400

    Initial work on presenting alert on error

* Bump writefreely-swift package minimum version

commit 91e2852243
Author: Angelo Stavrow <contact@angelostavrow.com>
Date:   Sat May 28 06:50:34 2022 -0400

    Bump writefreely-swift package minimum version
2022-07-28 07:47:39 -04:00
Angelo Stavrow
93c016268a
Add error handling to iOS post editor (#210) (#214)
* Add error handling to post editor

* Cleanup

* Add error handling to macOS (#211)

* Add error handling to Mac app

* Log fatal errors and present alert on next launch (#212)

* Log fatal crashes and present alert on next launch

* Update crash alert copy and navigate to help forum

* Refactor logging into reuseable methods

* Refactor class to use protocol

* Clean up todo comment

* Revert "Log fatal errors and present alert on next launch (#212)"

This reverts commit 7475b57772.
2022-07-28 07:38:19 -04:00
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
549ad3039f
Clean up project warnings (#199)
* Set "recommended project settings" for Mac app

* Add default fallback for font typingAttribute

* Clean up linter errors

* Update extension iconset

* Fix spm errors and upgrade sparkle (#203)

* Switch WriteFreely package import from ssh to https

* Sign macOS project target for Development

This fixes a crash-on-launch bug when running Product > Run from Xcode (Product > Archive should work correctly). See https://github.com/sparkle-project/Sparkle/issues/2056 for more details.

Bug introduced by commit:
671b0540ac

* Update Sparkle to v2.0 from official repo

Previously, we forked the repo to the WriteFreely org because Sparkle didn't support tag-based SPM updates. We therefore had to pull from the `master` branch, so forking insulated us from unexpected changes.

As of 2.x Sparkle now allows for tag-based updating via SPM; we'll allow patch updates but stop short of 2.1 until we can vet changes.

* Add MacUpdatesViewModel ObservableObject

* Use MacUpdatesViewModel to handle Sparkle update logic
2022-04-02 08:04:50 -04:00
Angelo Stavrow
7db11172c0
Move user defaults to App Group 2021-11-05 14:18:36 -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
ff7e7c3c0e
Re-enable launch-to-last-draft policy 2021-09-24 15:29:20 -04:00
Angelo Stavrow
3c1e04e3bf
Use view model for CollectionListView 2021-09-24 14:45:28 -04:00
Angelo Stavrow
8184919697
Create new draft in selected collection 2021-02-10 15:12:13 -05:00
Angelo Stavrow
3ccc9d68fd
Use shared instance var for app model 2021-02-10 15:01:23 -05:00
Angelo Stavrow
7d7fe4134b
Add editing menu, enable find/replace, ignore formatted text on paste 2021-01-28 17:45:10 -05:00
Angelo Stavrow
9bc4532193
Clear last draft when holding Shift key on Mac app launch 2021-01-26 09:27:43 -05:00
Angelo Stavrow
900ef269ba
Use same code path to set iOS and Mac app state on launch 2021-01-26 09:23:47 -05:00
Angelo Stavrow
e1c5823cd6
Move new-post generation for Mac app to PostEditorModel 2021-01-25 11:53:16 -05:00
Angelo Stavrow
20f12fa7cc
Move state-fetching logic to PostEditorModel for Mac app 2021-01-25 11:30:52 -05:00
Angelo Stavrow
dcb18c86db
Set app state in App entrypoint for macOS, in relevant Views for iOS 2021-01-21 15:39:28 -05:00
Angelo Stavrow
0b19c8461f
Set selection of post 2021-01-19 11:29:41 -05:00
Angelo Stavrow
deadfb8509
Save/restore navigation state to last selected post and collection 2021-01-14 17:04:52 -05:00
Angelo Stavrow
9b06eb34a8
Fix race condition in creating new post 2021-01-14 13:29:51 -05:00
Angelo Stavrow
34dfc1d7e1
Merge pull request #163 from writeas/integrate-sparkle-via-spm
Integrate sparkle via spm
2021-01-07 15:16:25 -05:00
Angelo Stavrow
1d1d4927b3
Conditionally include PostCommands if macOS 2020-12-28 15:15:14 -05:00
Angelo Stavrow
70dfda7ea0
Improve layout of Updates/Preferences window 2020-12-23 14:38:53 -05:00
Angelo Stavrow
b05938b497
Create an updates view for the Preferences window 2020-12-23 11:53:01 -05:00
Angelo Stavrow
fb13b9e8ab
Add “Check For Updates” entry to app menu 2020-12-23 10:21:23 -05:00
Angelo Stavrow
03df62a48c
Add AppDelegate stub 2020-12-22 15:06:25 -05:00
Angelo Stavrow
96472c2604
Add copy-published-post-link to Post command menu 2020-12-16 14:25:56 -05:00
Angelo Stavrow
6164ceeb99
Add PostCommands menu to Mac app 2020-12-16 11:35:40 -05:00
Angelo Stavrow
0365874ed1
Merge branch 'main' into show-progressview-during-network-request 2020-12-11 09:47:33 -05:00
Angelo Stavrow
5dc5108354
Add "Visit Support Forum" item to Help menu 2020-12-03 08:21:50 -05:00
Angelo Stavrow
bcf496e15d
Listen for shift-key on launch to run debug code 2020-12-01 16:17:53 -05:00
Angelo Stavrow
eff423f79e
Change "Reload From Server" File menu item to read "Refresh Posts" 2020-12-01 11:24:55 -05:00
Angelo Stavrow
c1be327694
Use native SwiftUI SidebarCommands() for toggle-sidebar menu item 2020-12-01 09:55:11 -05:00
Angelo Stavrow
7902bff33d
Remove reload button from toolbar 2020-12-01 09:53:09 -05:00
Angelo Stavrow
24897aae93
Update menu item from "New Local Draft" to "New Post" 2020-12-01 09:38:46 -05:00
Angelo Stavrow
7cb7fa3017
Use AppStorage dynamic property instead of direct UserDefaults update
Known issue: the menubar File > Reload From Server command will not update based on changes to model.account.isLoggedIn, but instead defaults to whatever the value was on app launch. Filed as FB8918303 with Apple.
2020-11-26 12:05:20 -05:00
Angelo Stavrow
acde0c8978
Add toolbar button logic, menu item, keyboard shortcut for server reload 2020-11-25 15:10:22 -05: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
1e432c6adb
Fix spacing when collapsing sidebar, add other buttons to toolbar 2020-11-25 14:11:57 -05:00
Angelo Stavrow
39ae839052
Add toolbar button and menu entry to toggle sidebar 2020-11-24 15:35:26 -05:00
Angelo Stavrow
444859b2fb
Load last draft or new post on launch 2020-11-04 15:23:03 -05:00
Angelo Stavrow
dad0fef7f1
Rename PersistenceManager to LocalStorageManager 2020-09-09 14:19:40 -04:00
Angelo Stavrow
8e035a43cb
Fetch user collections into CoreData and list from ManagedObjectContext 2020-09-08 09:55:43 -04:00