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:
parent
79583e0e61
commit
513d08998b
|
@ -14,8 +14,8 @@ android {
|
||||||
applicationId = "com.zaneschepke.wireguardautotunnel"
|
applicationId = "com.zaneschepke.wireguardautotunnel"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 34
|
targetSdk = 34
|
||||||
versionCode = 31600
|
versionCode = 31700
|
||||||
versionName = "3.1.6"
|
versionName = "3.1.7"
|
||||||
|
|
||||||
multiDexEnabled = true
|
multiDexEnabled = true
|
||||||
|
|
||||||
|
|
|
@ -42,14 +42,6 @@ class TunnelControlTile : TileService() {
|
||||||
super.onStartListening()
|
super.onStartListening()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onTileAdded() {
|
|
||||||
super.onTileAdded()
|
|
||||||
qsTile.contentDescription = this.resources.getString(R.string.toggle_vpn)
|
|
||||||
scope.launch {
|
|
||||||
updateTileState()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onTileRemoved() {
|
override fun onTileRemoved() {
|
||||||
super.onTileRemoved()
|
super.onTileRemoved()
|
||||||
cancelJob()
|
cancelJob()
|
||||||
|
|
|
@ -99,7 +99,7 @@ fun ConfigScreen(
|
||||||
) {
|
) {
|
||||||
|
|
||||||
val context = LocalContext.current
|
val context = LocalContext.current
|
||||||
val scope = rememberCoroutineScope { Dispatchers.IO }
|
val scope = rememberCoroutineScope()
|
||||||
val clipboardManager: ClipboardManager = LocalClipboardManager.current
|
val clipboardManager: ClipboardManager = LocalClipboardManager.current
|
||||||
val keyboardController = LocalSoftwareKeyboardController.current
|
val keyboardController = LocalSoftwareKeyboardController.current
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue