fix: config save bug

Fixes a bug where config changes were saving on the wrong thread, causing a failure to save changes.

Fixes a bug where the quick tile could cause a crash by initializing the tile state before it was ready.
This commit is contained in:
Zane Schepke 2023-10-23 16:13:37 -04:00
parent 79583e0e61
commit 513d08998b
3 changed files with 3 additions and 11 deletions

View File

@ -14,8 +14,8 @@ android {
applicationId = "com.zaneschepke.wireguardautotunnel"
minSdk = 26
targetSdk = 34
versionCode = 31600
versionName = "3.1.6"
versionCode = 31700
versionName = "3.1.7"
multiDexEnabled = true

View File

@ -42,14 +42,6 @@ class TunnelControlTile : TileService() {
super.onStartListening()
}
override fun onTileAdded() {
super.onTileAdded()
qsTile.contentDescription = this.resources.getString(R.string.toggle_vpn)
scope.launch {
updateTileState()
}
}
override fun onTileRemoved() {
super.onTileRemoved()
cancelJob()

View File

@ -99,7 +99,7 @@ fun ConfigScreen(
) {
val context = LocalContext.current
val scope = rememberCoroutineScope { Dispatchers.IO }
val scope = rememberCoroutineScope()
val clipboardManager: ClipboardManager = LocalClipboardManager.current
val keyboardController = LocalSoftwareKeyboardController.current