Skip to content

Commit 070af7f

Browse files
committed
Show 'connecting...' when reconnecting
1 parent 721cbda commit 070af7f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

app/src/main/java/tech/httptoolkit/android/MainActivity.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,12 @@ class MainActivity : AppCompatActivity(), CoroutineScope by MainScope() {
308308

309309
private suspend fun reconnect(lastProxy: ProxyConfig) {
310310
app.trackEvent("Button", "reconnect")
311+
312+
withContext(Dispatchers.Main) {
313+
mainState = MainState.CONNECTING
314+
updateUi()
315+
}
316+
311317
try {
312318
// Revalidates the config, to ensure the server is available (and drop retries if not)
313319
val config = getProxyConfig(

0 commit comments

Comments
 (0)