Show change server button during connection for free users
✨ 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.
Note: I was unable to test the changes due to project complexity and missing dependencies. Please consider this as a suggestion for improvement — the implementation is based on analysis of the current codebase and Android behavior.
🛠️ 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:
- Added
HasTroubleConnecting()method toIChangeServerModeratorinterface - Implemented connection state tracking in
ChangeServerModerator - Updated
CanChangeServerlogic to allow server changes during connection - Added
HasTroubleConnectingproperty 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.