Commit Graph

45 Commits

Author SHA1 Message Date
Angelo Stavrow
3f424b399a
Improve offline experience (#255) 2023-10-23 17:15:41 -04:00
Angelo Stavrow
73d219d0ec
Handle undo of edited posts (#251) 2023-07-23 07:19:52 -04:00
Angelo Stavrow
39a78c56b6
Fix sharing picker and prep for v1.0 release of Mac app (#242)
* Present sharing menu in background, not popover

* Write logs to new post (#236)

* Set the post editor font in the updateUIView method (#237)

* Wrap becomeFirstResponder in async dispatch

This fixes issues when we’re updating the responder chain every time SwiftUI refreshes the view, which can have unpredictable side effects.

* Set the font in the updateUIView method

* Bump build number and update change log

* 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

* Revert "Don't navigate to new/last draft on launch (#238)" (#239)

This reverts commit f4ba5f9a90.

* Revert "Set the post editor font in the updateUIView method (#237)" (#240)

This reverts commit d46eb639ad.

* 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.

* Update change log

* Set the post editor font in the updateUIView method

commit f9f94b48d3465f9bcfc47ea5e478cc1d66da9a4d
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 10:05:03 2022 -0500

    Fix missed changes in change log

commit 593cc8f1fa83feec923905a5004b885fa68e3003
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:46:36 2022 -0500

    Bump patch version and build number

commit e0f752e6a4828c3d09649da8f9fe5a1902a2f137
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:47:37 2022 -0500

    Bump build number and update change log

commit 2f7163dff4ca9d3279c553190b78d2d47277a03e
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:43:00 2022 -0500

    Update change log

commit e42436676d2ce2e70e96a18364cb8127a5921cb5
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:40:27 2022 -0500

    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.

commit d7c03b9d2d1165a9b34d96a4e5350214211c1643
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:26:18 2022 -0500

    Revert "Set the post editor font in the updateUIView method (#237)" (#240)

    This reverts commit d46eb639ad.

commit 43b53c6e456d7b59e7363d1591363c58a246b4be
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:25:36 2022 -0500

    Revert "Don't navigate to new/last draft on launch (#238)" (#239)

    This reverts commit f4ba5f9a90.

commit 34546f994efaa77d21ff51aad84201f2dbbffd3e
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:06:31 2022 -0500

    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

commit bc3bc23308
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:47:37 2022 -0500

    Bump build number and update change log

commit 7703e925b7
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:40:41 2022 -0500

    Set the font in the updateUIView method

commit 6e60e0ded5
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:40:11 2022 -0500

    Wrap becomeFirstResponder in async dispatch

    This fixes issues when we’re updating the responder chain every time SwiftUI refreshes the view, which can have unpredictable side effects.

* Squashed commit of the following:

commit f9f94b48d3465f9bcfc47ea5e478cc1d66da9a4d
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 10:05:03 2022 -0500

    Fix missed changes in change log

commit 593cc8f1fa83feec923905a5004b885fa68e3003
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:46:36 2022 -0500

    Bump patch version and build number

commit e0f752e6a4828c3d09649da8f9fe5a1902a2f137
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:47:37 2022 -0500

    Bump build number and update change log

commit 2f7163dff4ca9d3279c553190b78d2d47277a03e
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:43:00 2022 -0500

    Update change log

commit e42436676d2ce2e70e96a18364cb8127a5921cb5
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:40:27 2022 -0500

    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.

commit d7c03b9d2d1165a9b34d96a4e5350214211c1643
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:26:18 2022 -0500

    Revert "Set the post editor font in the updateUIView method (#237)" (#240)

    This reverts commit d46eb639ad.

commit 43b53c6e456d7b59e7363d1591363c58a246b4be
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:25:36 2022 -0500

    Revert "Don't navigate to new/last draft on launch (#238)" (#239)

    This reverts commit f4ba5f9a90.

commit 34546f994efaa77d21ff51aad84201f2dbbffd3e
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Thu Dec 29 09:06:31 2022 -0500

    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

commit bc3bc23308
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:47:37 2022 -0500

    Bump build number and update change log

commit 7703e925b7
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:40:41 2022 -0500

    Set the font in the updateUIView method

commit 6e60e0ded5
Author: Angelo Stavrow <angelo@droppedbits.com>
Date:   Mon Dec 12 07:40:11 2022 -0500

    Wrap becomeFirstResponder in async dispatch

    This fixes issues when we’re updating the responder chain every time SwiftUI refreshes the view, which can have unpredictable side effects.

* Set the font in the updateUIView method

Also, wrap becomeFirstResponder in async dispatch

This fixes issues when we’re updating the responder chain every time SwiftUI refreshes the view, which can have unpredictable side effects.

* 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

* Update change log and bump build number

* Adjust initial frame size

* Bump minimum version to macOS 12

* Bump version and build number

* Bump build number

* Bump build number (again?)

* Undo initial sizing of settings window

* Bump build number

* Improve share button services

Adds two useful services to which the user can share a post: copy-URL-to-pasteboard (custom), and add-to-reading-list (system-provided).

* Improve initial layout of window
2023-02-12 11:14:26 -05: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
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
11ad3bc2ff
Use LocalStorageManager 'standard' singleton 2021-10-08 17:07:06 -04:00
Angelo Stavrow
a4b0710281
Merge pull request #178 from writeas/bugfix-mac-crash
Bugfix mac crash
2021-02-11 10:34:02 -05:00
Angelo Stavrow
b25252a2f6
Save changes one second after user stops typing or when leaving post 2021-02-10 15:16:34 -05:00
Angelo Stavrow
4c6eb07846
Set text color in typingAttributes property 2021-02-08 16:25:25 -05:00
Angelo Stavrow
ad78389dc3
Set typingAttributes for Mac post editor 2021-02-02 10:08:46 -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
022792e7f4
Enable undo in MacEditorTextView 2020-12-18 14:58:09 -05:00
Angelo Stavrow
7e6997a821
Reset isPresented binding after dismissing picker 2020-12-11 15:26:40 -05:00
Angelo Stavrow
c99df92c6b
Don’t present share service picker twice 2020-12-11 15:07:27 -05:00
Angelo Stavrow
2a2628d9e4
Add PostEditorSharingPicker for Mac app 2020-12-11 11:45:11 -05:00
Angelo Stavrow
1c9ca05527
Move clear-last-draft call to PostEditor.onDisappear 2020-11-27 16:25:49 -05:00
Angelo Stavrow
b788994144
Save/load last draft per editor launching policy 2020-11-26 15:53:17 -05:00
Angelo Stavrow
1a8ae1d4d3
Remove PostEditorView toolbar (post status badge and publish button) 2020-11-24 15:15:28 -05:00
Angelo Stavrow
2e56d62ea8
Implement line spacing on post 2020-11-24 14:35:49 -05:00
Angelo Stavrow
e884a90582
Clean up print statements and setting fonts 2020-11-23 14:58:51 -05:00
Angelo Stavrow
2078eb7199
Conform to similar test as iOS app for showing server reload UI 2020-11-23 14:57:51 -05:00
Angelo Stavrow
486b2ce0fe
Implement post status change detection 2020-11-23 14:37:13 -05:00
Angelo Stavrow
c2e124de31
Render post in correct font 2020-11-23 14:13:15 -05:00
Angelo Stavrow
99551b9a1d
Make first responder only if this is a blank new post 2020-11-23 12:14:21 -05:00
Angelo Stavrow
c655e628e1
Clean up SwiftLint warnings and add pseudo-placeholder text to editor 2020-11-23 11:59:01 -05:00
Angelo Stavrow
ba64716840
Initial integration of MacEditorTextView into post editor 2020-11-23 11:18:03 -05:00
Angelo Stavrow
d333049cac
Add tweaked MacEditorTextView to project 2020-11-23 10:52:19 -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
bd695b23e6
Remove anything that attempts to set selected post or last draft 2020-10-29 12:03:31 -04:00
Angelo Stavrow
a542afa405
Refactor text-editing views out of PostEditorView [Mac] 2020-10-23 16:01:37 -04:00
Angelo Stavrow
d6a073ccd8
Merge pull request #107 from writeas/editor-design-improvements
Minor editor design improvements
2020-10-23 09:40:28 -04:00
5d59e180e7 [Mac] Add some spacing between lines in the editor 2020-10-21 16:03:20 -04:00
873d39eb5c [Mac] Make editor title field padding consistent with body
This applies the same changes from iOS. It is untested.
2020-10-21 16:02:31 -04:00
Angelo Stavrow
a289e544b1
Do not disable networking buttons if hasNetworkConnection is false 2020-10-16 17:35:02 -04:00
Angelo Stavrow
3e543108fb
Only update post status if we're not updating from the server 2020-10-06 14:26:57 -04:00
Angelo Stavrow
cf5f0fe4de
Open the preferences window on publish if not logged in [macOS] 2020-09-30 09:36:57 -04:00
Angelo Stavrow
e735e7a3d1
Open the settings screen on publish if not logged in [iOS only for now] 2020-09-29 15:35:32 -04:00
Angelo Stavrow
776f1ed3ed
Fix crashing bug on iPad and macOS when removing blank posts 2020-09-29 12:39:19 -04:00
Angelo Stavrow
8e4957a389
Delete blank/untouched local draft from store when leaving editor 2020-09-24 16:17:56 -04:00
Angelo Stavrow
44fd09aa33
Clear lastDraft if selectedPost has published status 2020-09-24 14:13:32 -04:00
Angelo Stavrow
70189a6193
Set lastDraft if post status changes to edited (or local) 2020-09-23 16:16:18 -04:00
Angelo Stavrow
aa1fddce92
Make .onDisappear conditional more reliable 2020-09-23 14:36:52 -04:00
Angelo Stavrow
f2743466eb
Remove iOS-specific code from macOS PostEditorView 2020-09-23 10:27:30 -04:00
Angelo Stavrow
10fc24d66a
Split PostEditorView into iOS and macOS counterparts 2020-09-22 16:18:00 -04:00