Show change server button during connection for free users #110
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.
✨ Motivation / Context
Currently, on Windows, free users may experience connection hangs when a randomly selected server is unavailable or slow to respond. Unlike Android, there is no way to manually change the server until the connection is fully established, which may never happen in such cases.
On Android, however, the "Change Server" button becomes available after 6 seconds during the connection attempt, allowing the user to select a different server and successfully connect.
This PR brings the same UX improvement to the Windows client by enabling the button after 6 seconds during connection.
🛠️ Summary of Changes
Align Windows client behavior with Android by showing the "Change Server" button during the connection process for free-tier users.
Previously, the button only appeared after the connection was successfully established. Now it appears during connection if it takes longer than 6 seconds, matching the Android implementation.
🔧 Code Changes:
HasTroubleConnecting()method toIChangeServerModeratorinterfaceChangeServerModeratorCanChangeServerlogic to allow server changes during connectionHasTroubleConnectingproperty toChangeServerComponentViewModel📈 Expected Result
This improves the user experience for free-tier users experiencing slow or stuck connections by allowing them to change servers without waiting indefinitely for full connection establishment.