Skip to content

Commit

Permalink
Fix being able to fetch multiple profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
dzolnai committed Jun 20, 2024
1 parent 3cbaebf commit 0a09bcb
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import android.os.Bundle
import android.view.View
import androidx.appcompat.app.AlertDialog
import androidx.fragment.app.viewModels
import androidx.lifecycle.Observer
import androidx.recyclerview.widget.LinearLayoutManager
import com.google.android.material.snackbar.Snackbar
import nl.eduvpn.app.BuildConfig
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class WireGuardService(private val context: Context, timer: Flow<Unit>): VPNServ
withContext(Dispatchers.Main) {
pendingConfig = config
authorizeVPN(activity)
setConnectionStatus(VPNStatus.DISCONNECTED)
setConnectionStatus(VPNStatus.CONNECTING)
}
} else {
fail(ex.toString())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ abstract class BaseConnectionViewModel(
}

fun getProfiles(instance: Instance) {
connectionState.value = ConnectionState.FetchingProfiles
viewModelScope.launch(Dispatchers.IO) {
try {
preferencesService.setCurrentInstance(instance)
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/java/nl/eduvpn/app/viewmodel/MainViewModel.kt
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ class MainViewModel @Inject constructor(
backendService.startProxyguard(config.proxy)
} catch (ex: CommonException) {
// These are just warnings, so we log them, but don't display to the user
Log.w( TAG, "Unable to start failover detection", ex)
Log.w( TAG, "Unable to start Proxyguard detection", ex)
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ class ServerSelectionViewModel @Inject constructor(
context: Context,
backendService: BackendService,
private val historyService: HistoryService,
private val preferencesService: PreferencesService,
private val organizationService: OrganizationService,
preferencesService: PreferencesService,
vpnConnectionService: VPNConnectionService,
) : BaseConnectionViewModel(
context,
Expand Down Expand Up @@ -155,6 +155,5 @@ class ServerSelectionViewModel @Inject constructor(

companion object {
private val TAG = ServerSelectionViewModel::class.java.name
private const val SERVER_LIST_CACHE_TTL = 15 * 60 * 1_000L // 15 minutes
}
}

0 comments on commit 0a09bcb

Please sign in to comment.