Skip to content

Commit

Permalink
fix: ui bug and graphene notification
Browse files Browse the repository at this point in the history
Fixes a bug where save button was hidden on config screen

Adds a disclaimer notification for when GrapheneOS auto enabled Always-on VPN on first app tunnel start

Closes #121 #120
  • Loading branch information
zaneschepke committed Feb 20, 2024
1 parent c8205c4 commit ee8db0a
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ object Queries {
VALUES
('false',
'false',
'[trustedSSID1,trustedSSID2]',
'sampleSSID1,sampleSSID2',
NULL,
'false',
'false',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ class WireGuardTunnelService : ForegroundService() {
tunnelName = tunnel.name
vpnService.startTunnel(tunnel)
}
} else {
launchAlwaysOnDisabledNotification()
}
}
}
Expand Down Expand Up @@ -116,6 +118,11 @@ class WireGuardTunnelService : ForegroundService() {
}
}

private fun launchAlwaysOnDisabledNotification() {
launchVpnNotification(title = this.getString(R.string.vpn_connection_failed),
description = this.getString(R.string.always_on_disabled))
}

override fun stopService(extras: Bundle?) {
super.stopService(extras)
lifecycleScope.launch(Dispatchers.IO) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ fun ConfigScreen(
var fobColor by remember { mutableStateOf(secondaryColor) }
FloatingActionButton(
modifier =
Modifier.onFocusChanged {
Modifier.padding(bottom = 90.dp).onFocusChanged {
if (WireGuardAutoTunnel.isRunningOnAndroidTv()) {
fobColor = if (it.isFocused) hoverColor else secondaryColor
}
Expand Down
5 changes: 3 additions & 2 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
<string name="last_handshake">Last handshake</string>
<string name="name">Name</string>
<string name="restart">Restart Tunnel</string>
<string name="vpn_connection_failed">VPN Connection Failed</string>
<string name="vpn_connection_failed">Connection failed</string>
<string name="failed_connection_to">Failed connection to -</string>
<string name="initial_connection_failure_message">Attempting to connect to server after 30 seconds of no response.</string>
<string name="lost_connection_failure_message">Attempting to reconnect to server after more than one minute of no response.</string>
Expand All @@ -90,7 +90,7 @@
<string name="clear_icon">Clear Icon</string>
<string name="search_icon">Search Icon</string>
<string name="attempt_connection">Attempting connection..</string>
<string name="vpn_starting">VPN Starting</string>
<string name="vpn_starting">VPN starting</string>
<string name="db_name">wg-tunnel-db</string>
<string name="scanning_qr">Scanning for QR</string>
<string name="qr_result_failed">QR scan failed</string>
Expand Down Expand Up @@ -175,4 +175,5 @@
<string name="included">included</string>
<string name="excluded">excluded</string>
<string name="all">all</string>
<string name="always_on_disabled">Always-on VPN attempted to start a tunnel, but this feature is disabled in settings.</string>
</resources>
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Constants.kt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
object Constants {
const val VERSION_NAME = "3.3.7"
const val VERSION_NAME = "3.3.8"
const val JVM_TARGET = "17"
const val VERSION_CODE = 33700
const val VERSION_CODE = 33800
const val TARGET_SDK = 34
const val MIN_SDK = 26
const val APP_ID = "com.zaneschepke.wireguardautotunnel"
Expand Down
4 changes: 4 additions & 0 deletions fastlane/metadata/android/en-US/changelogs/33800.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
What's new:
- Config edit UI bug fix
- Add GrapheneOS first launch AOVPN notification
- Bump versions
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ google-services = "4.4.1"
hiltAndroid = "2.50"
hiltNavigationCompose = "1.1.0"
junit = "4.13.2"
kotlinx-serialization-json = "1.6.2"
kotlinx-serialization-json = "1.6.3"
lifecycle-runtime-compose = "2.7.0"
material3 = "1.2.0"
navigationCompose = "2.7.7"
Expand Down

0 comments on commit ee8db0a

Please sign in to comment.