Repository navigation
Conversation
…a question before quitting The Mac counterpart of AnyPS5-Desktop boykopovar#151. The main button of an unlock the user asked for is Pause, then Resume. A paused unlock steps aside so the next one starts, and a Resume while another one runs waits its turn. A small Cancel button after it asks first. Quitting (Cmd-Q, the window's close, Quit AnyPS5) while games are unlocked or removed asks first, and Cancel and quit stops every unlock, a paused one included, before the app goes. The phone sees a paused unlock as locked.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Waits for AnyTogether/AnyPS5-Desktop#151. Do not merge this one on its own: the two land together.
What
This is the Mac counterpart of AnyTogether/AnyPS5-Desktop#151 by lenny4250, "Pause and resume for unlocks, a separate Cancel button, and a confirmation before closing the window". It follows the Desktop PR as it will be after the changes our review asks for there, in the Mac launcher's own SwiftUI style.
Only an unlock the user asked for gets the new controls. A game prepared in the background, an update of an installed game and an unlock started to play afterwards keep what they do today.
applicationShouldTerminate. The card offers Go back and Cancel and quit (Quit anyway when only a removal runs), with "Cancel and quit throws the work away. To stop and go on later, go back and use Pause, and keep the launcher open." and, during a removal, "Removing games can be neither paused nor cancelled." Cancel and quit empties the queue, cancels every unlock (a paused one gets SIGCONT so it receives the termination, asInstaller.cancelalready does) and the background preparation, waits up to ten seconds for them to end, then quits. On every quit that does not ask, the same cancel runs, so no stopped relinker is left behind. Games prepared in the background alone do not make it ask.cancelUnlock("Cancel unlock"), which the Mac did not have. English and Turkish are in full, as are German, Spanish, French and Portuguese with the PR's own texts and 18 more languages. Amharic, Bhojpuri, Khmer and Lao getcancelUnlockfrom Desktop's files and show the other texts in English, as the launcher does for any text a file lacks. Turkish uses "Duraklat", "Devam et" and "Kilit açmayı iptal et", as Desktop does.Deliberate differences from Desktop
applicationShouldTerminate. Our review asks Desktop to hook the native close (onExitRequested) the same way.UnlockWorkprotocol (pause, resume, cancel), whichInstallerconforms to, so the tests can drive the queue without a relinker.Release note
Unlocks can be paused: the button of a game being unlocked is now Pause, and Resume goes on from where it stopped while the next game in line goes ahead. A small ✕ beside it cancels the unlock after asking, and quitting while games are being unlocked or removed asks first.
Tested
CI only. Nothing was built or run on a Mac: there was no local
swift buildorswift test, and the screens were not looked at.Tests/AnyPS5Tests/UnlockPauseTests.swift, with stand-in unlocks that count what they are asked: pausing lets the next one start, Resume while another runs waits and is never dropped by its main button, Resume with nothing else running goes on at once, the ✕ asks first and Keep going keeps the work, a paused unlock can be cancelled while a queued one drops at once, quitting asks (Escape's question and the app delegate's path) and Cancel and quit cancels the paused one too and waits for the work to end, quitting with nothing unlocked asks nothing, the phone's mapping and activity, and the texts in English and Turkish.LanguageCheckTestscovers the 28 files.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)