Commit 88717551 authored by clairehurst's avatar clairehurst 🌱 Committed by Beatriz Rizental
Browse files

fixup! [android] Implement Android-native Connection Assist UI

Bug 43576: Connection Assist on Android Fast Follows (Bug 41188)
cleanup use of _torConnectScreen.value: !1426 (comment 3176147)
parent ecfbbb89
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -290,7 +290,7 @@ class TorConnectionAssistFragment : Fragment(), UserInteractionHandler {
                if (screen.torBootstrapButton1ShouldOpenSettings) {
                    openTorConnectionSettings()
                } else {
                    torConnectionAssistViewModel.handleConnect()
                    torConnectionAssistViewModel.handleConnect(screen)
                }
            }
            updateButton1(screen)
+3 −3
Original line number Diff line number Diff line
@@ -97,12 +97,12 @@ class TorConnectionAssistViewModel(
        MutableLiveData(false)
    }

    fun handleConnect() {
        val screen = _torConnectScreen.value
        if (screen.torBootstrapButton1ShouldTryABridge && !button1ShouldBeDisabled(screen)) {
    fun handleConnect(screen: ConnectAssistUiState) {
        if (screen.torBootstrapButton1ShouldTryABridge) {
            Log.d(TAG, "beginAutoBootstrap with countryCode: ${selectedCountryCode.value}")
            torAndroidIntegration.beginAutoBootstrap(selectedCountryCode.value)
        } else {
            Log.d(TAG, "beginBootstrap() on screen $screen")
            torAndroidIntegration.beginBootstrap()
        }
    }