fix: trusted SSIDs bug
Fixes bugs where trusted SSIDs were getting whitespace added every time they were saved to the DB. Fixes file explorer bug on AndroidTV where the app crashes if they do not have a file explorer installed on the device.
This commit is contained in:
parent
7fbc51af4c
commit
11aea3f1c4
|
@ -14,8 +14,8 @@ android {
|
|||
applicationId = "com.zaneschepke.wireguardautotunnel"
|
||||
minSdk = 26
|
||||
targetSdk = 34
|
||||
versionCode = 30001
|
||||
versionName = "3.0.1"
|
||||
versionCode = 30002
|
||||
versionName = "3.0.2"
|
||||
|
||||
multiDexEnabled = true
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ import androidx.room.TypeConverter
|
|||
class DatabaseListConverters {
|
||||
@TypeConverter
|
||||
fun listToString(value: MutableList<String>): String {
|
||||
return value.joinToString()
|
||||
return value.joinToString(",")
|
||||
}
|
||||
@TypeConverter
|
||||
fun <T> stringToList(value: String): MutableList<String> {
|
||||
|
|
|
@ -214,7 +214,11 @@ fun MainScreen(
|
|||
addCategory(Intent.CATEGORY_OPENABLE)
|
||||
type = Constants.ALLOWED_FILE_TYPES
|
||||
}
|
||||
if (fileSelectionIntent.resolveActivity(context.packageManager) != null) {
|
||||
pickFileLauncher.launch(fileSelectionIntent)
|
||||
} else {
|
||||
viewModel.showSnackBarMessage(context.getString(R.string.no_file_app))
|
||||
}
|
||||
}
|
||||
.padding(10.dp)
|
||||
) {
|
||||
|
@ -271,7 +275,7 @@ fun MainScreen(
|
|||
.nestedScroll(nestedScrollConnection),
|
||||
) {
|
||||
items(tunnels, key = { tunnel -> tunnel.id }) {tunnel ->
|
||||
val focusRequester = FocusRequester()
|
||||
val focusRequester = remember { FocusRequester() }
|
||||
RowListItem(leadingIcon = Icons.Rounded.Circle,
|
||||
leadingIconColor = if (tunnelName == tunnel.name) when (handshakeStatus) {
|
||||
HandshakeStatus.HEALTHY -> mint
|
||||
|
|
|
@ -96,4 +96,5 @@
|
|||
<string name="never">Never</string>
|
||||
<string name="stream_failed">Failed to open file stream.</string>
|
||||
<string name="unknown_error_message">An unknown error occurred.</string>
|
||||
<string name="no_file_app">No file app installed.</string>
|
||||
</resources>
|
Loading…
Reference in New Issue