Closed aptonline closed 3 months ago
Please use 1.2.2 for now
It seems I have broken auto-launch in 1.2.3
Same issue with 1.2.2 for me.
Keep going back until you find one that works :)
That would help me find the point at which I broke it.
Then I'll fix it later today.
OK, I broke it in 1.2 as 1.1 auto-launches.
Gah.
Will fix later on
So, in the latest code as it stands it does still work... it's just the flaky nature of the way I am deciding if the file was opened from Finder or not to do an auto-launch is ....crap. See #2
if isOpenedFromFinder && !appStateManager.wasJustLaunched {
This means that it won't work in some scenarios, including opening a document to launch the app which is a pretty big oversight on my part. Need to improve that.
Closing in favour of #2
Feel free to reply if there's anything more to add.
Hi, this is still not working for me even from a cold start of the app. Same result. no documents opening.
Screen recording please @aptonline
I believe you I just want to analyse what's happening.
As requested, tested with no app open and then launching the document I created and testing Quicklook to show the files are present.
https://github.com/user-attachments/assets/b2d84ddb-941a-4642-bd78-92b02da94ac4
Right, I agree it's broken in this usage.
I thought you were saying you tried my workaround and that didn't work.
You can use my workaround (basically, leave Stapler open) until I fix this soon.
Leaving Stapler open and launching the document has the same result. Nothing happens.
Well, it's leaving Stapler open in the background.
But if you're doing that, then I can't reproduce what you're seeing.
https://github.com/user-attachments/assets/e8eda74c-37df-4722-832c-ee783e0484a9
But, this will be reworked soon so don't worry about whether or not we can agree on repro.
It's certainly flakey as its started working today if I leave the app open.
As an aside, would it be possible to add a preference toggle displaying the open dialog when launching the app?
The app is not self-modifying ๐ so it can't just start working.
Small change: https://github.com/gingerbeardman/stapler/commit/feaa002287e82e1d13f4cc4aac7ef4a35030c9c4
Will live with this for a while. Not entirely sure it's a better experience, more changes needed.
The app is not self-modifying ๐ so it can't just start working.
And yet here we areโฆ
Iโll test the new version when itโs released and provide an update ๐
Had a brain wave. Cross your fingers.
I will also put some logging in so we can check some things!
EUREKA.
Just taking a moment to think if there are any other scenarios I need to deal with.
// Define an enum for the different document opening scenarios
enum DocumentOpeningScenario {
case launchedWithDocument
case resumedBySystem
case openedThroughFileMenu
case openedFromFinderWhileRunning
case unknown
}
Will give it a whirl on the next release.
All working for me now from my tests ๐๐ผ
Describe the bug Files not opening when launching the stapler document
To Reproduce Testing for the first time and adding a number of documents (.PDF,.MP4) files into a document both via drag and drop and also via 'Add files'. Saving the document to the desktop and launching from there. The Stapler document opens and shows the added files but no documents are opening. It appears to be opening in edit mode (command key down).
Expected behavior Documents open as expected when opening the Stapler document.
Versions (please complete the following information):
Additional context No error messages appears and app does not crash, just shows the contents of the Stapler document.