Repository navigation
Conversation
…des and a room link Create and Join no longer go grey over a missing name or code. They stay live, and a tap marks the field, says what is missing and moves focus to the name. A tap while disconnected connects first and then carries on, because the session drops a create message with no error when the socket is down. The host can show the room as a QR code. Android scans one with the camera and Desktop reads one from an image file. A phone's camera app can open the simpmusic://listen-together link. A scanned code or a link only fills in the form and never joins by itself. Metrolist's share link is accepted too, since rooms are shared with that app.
A link that launches the app could reach the router before NavHost had set its graph, and navigating then crashed with "You must call setGraph() before calling getGraph()". That is how a room link opens from a phone's camera app.
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.
What & why
On the Listen Together screen, Create and Join go grey until there is a display name, a complete code and a server connection, and nothing says which one is missing. Sharing a room in person also means reading the code out and typing it in. This fixes both:
ListenTogetherSession.createRoomdrops its message with no error when the socket is down. Only that wait disables the buttons.simpmusic://listen-together?code=XXXXXXXXopens the screen with the code filled in, so a phone's camera app can open a room. Pasting a link or the share message into the code field works too.App.ktbeforeNavHosthad set its graph, which crashed withYou must call setGraph() before calling getGraph(). The router now waits for the graph. I only saw this with the room link, on Desktop, and I can't say whether other links can hit it.Decisions worth checking
https://simpmusic.org/app/…:simpmusic.org/.well-known/assetlinks.jsonredirects towww, which answers 404, and so does/app/*, so a camera app would land on a 404 page. The parser and router already accept the https form, so once the site serves it, moving over means changinglistenTogetherLink().roomCodeFromTextreturns only a validated 8-character code, so a QR code can't open a page either.Screenshots
Missing display name:
Room QR code (Arch):
Scanner (Samsung):
Samsung camera opening the room:
Size and scope
CAMERAare already there for Login Sync.QrCodeImagemoved out of Login Sync's Desktop dialog, and three Login Sync helpers andimageFileFilterbecameinternal.strings.xmlonly, for Crowdin.utils/ListenTogetherLink.ktandListenTogetherViewModel.kt, and the crash fix can be read alone in the second commit.CLAUDE.mdhas the changelog entry the repo's rule asks for.Linked issue
Closes #2797
No maintainer has responded on #2797 yet, so the first box below is unticked. If you'd rather discuss the approach there first, that's fine.
Checklist
Devices: Android on a Samsung phone (debug universal APK) and Desktop on Arch Linux (release build, as a tarball rather than the signed AppImage).
Tested by hand between the two devices:
After rebasing onto current
dev: the hand tests ran on the build from just before the rebase, which only brought in upstream's commits. The rebased code built and passed on my fork: Android debug APK, Desktop release build, and 41/41 tests across the 14 new ones,SimpIconsFitTestandPromoSelectionTest. The Desktop build also launched from a room link on a virtual display with no crash.Not tested: Windows, macOS, the vivo build, or camera apps on other phones. Whether a camera app offers to open a
simpmusic://code depends on that app.I used AI assistance for this work. I reviewed every line and can answer questions about it.