diff --git a/app/build.gradle.kts b/app/build.gradle.kts index dce8bc1..f9dddd8 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -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 diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/repository/DatabaseListConverters.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/repository/DatabaseListConverters.kt index e4e94c8..aee8e76 100644 --- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/repository/DatabaseListConverters.kt +++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/repository/DatabaseListConverters.kt @@ -5,7 +5,7 @@ import androidx.room.TypeConverter class DatabaseListConverters { @TypeConverter fun listToString(value: MutableList): String { - return value.joinToString() + return value.joinToString(",") } @TypeConverter fun stringToList(value: String): MutableList { diff --git a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/main/MainScreen.kt b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/main/MainScreen.kt index 3a8195f..a8d52af 100644 --- a/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/main/MainScreen.kt +++ b/app/src/main/java/com/zaneschepke/wireguardautotunnel/ui/screens/main/MainScreen.kt @@ -214,7 +214,11 @@ fun MainScreen( addCategory(Intent.CATEGORY_OPENABLE) type = Constants.ALLOWED_FILE_TYPES } - pickFileLauncher.launch(fileSelectionIntent) + 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 diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index cfbec0b..cc42aeb 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -96,4 +96,5 @@ Never Failed to open file stream. An unknown error occurred. + No file app installed. \ No newline at end of file