Repository navigation
feat: accept either homeserver or username on login (solves #12) - #141
Merged
Merged
Conversation
…ate#12) This commit enables the user to enter either their fully qualified username or only their hostnames server on initial login
viktorstrate
requested changes
Nov 20, 2026
viktorstrate
left a comment
Owner
There was a problem hiding this comment.
Thank you for the PR :) I've left some comments.
|
|
||
| @State private var loading: Bool = false | ||
| @State private var showError: Error? = nil | ||
| @State private var isCredentialStage: Bool = false |
Owner
There was a problem hiding this comment.
I don't think we need this state. Instead we can derive it from homeserverLogin != nil.
Contributor
Author
There was a problem hiding this comment.
sure, great idea. didn't think of that, thanks!
Comment on lines
+38
to
+41
| if parts.count == 2 { | ||
| usernameField = String(parts[0]) | ||
| homeserverField = String(parts[1]) | ||
| } |
Owner
There was a problem hiding this comment.
Since parts.count can only be 2, I'd rather use an assert(parts.count == 2) instead of the if conditional.
Contributor
Author
|
Thanks for the quick reply! I'm not thaat familiar with Swift and SwiftUI (yet) but I’m trying to get a hold of it. I refactored the parts you suggested :) |
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.
Hey there,
I really want a native mac Matrix client to exist and want to help out wherever possible.
This PR enables the user to enter either their fully qualified username or only their hostnames server on initial login as requested in #12.
I've attached a demo of how the changes look below.
Any feedback is very welcome :)
issue_12_demo.mov