Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix being able to fetch multiple profiles #424

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
}
Loading