diff options
Diffstat (limited to 'app/src/main/res')
-rw-r--r-- | app/src/main/res/layout/tunnel_detail_fragment.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/layout/tunnel_list_item.xml | 4 | ||||
-rw-r--r-- | app/src/main/res/values/strings.xml | 1 |
3 files changed, 6 insertions, 3 deletions
diff --git a/app/src/main/res/layout/tunnel_detail_fragment.xml b/app/src/main/res/layout/tunnel_detail_fragment.xml index e10bc4e1..900d08ed 100644 --- a/app/src/main/res/layout/tunnel_detail_fragment.xml +++ b/app/src/main/res/layout/tunnel_detail_fragment.xml @@ -5,6 +5,8 @@ <data> + <import type="com.wireguard.android.fragment.TunnelController" /> + <import type="com.wireguard.android.model.Tunnel.State" /> <import type="com.wireguard.android.util.ClipboardUtils" /> @@ -52,7 +54,7 @@ android:layout_alignBaseline="@+id/interface_title" android:layout_alignParentEnd="true" app:checked="@{tunnel.state == State.UP}" - app:onBeforeCheckedChanged="@{() -> tunnel.setState(State.TOGGLE)}" /> + app:onBeforeCheckedChanged="@{TunnelController::setTunnelState}" /> <TextView android:id="@+id/interface_name_label" diff --git a/app/src/main/res/layout/tunnel_list_item.xml b/app/src/main/res/layout/tunnel_list_item.xml index 1ed157e9..7fbd61f7 100644 --- a/app/src/main/res/layout/tunnel_list_item.xml +++ b/app/src/main/res/layout/tunnel_list_item.xml @@ -4,6 +4,8 @@ <data> + <import type="com.wireguard.android.fragment.TunnelController" /> + <import type="com.wireguard.android.model.Tunnel" /> <import type="com.wireguard.android.model.Tunnel.State" /> @@ -47,6 +49,6 @@ android:layout_alignBaseline="@+id/tunnel_name" android:layout_alignParentEnd="true" app:checked="@{item.state == State.UP}" - app:onBeforeCheckedChanged="@{() -> item.setState(State.TOGGLE)}" /> + app:onBeforeCheckedChanged="@{TunnelController::setTunnelState}" /> </RelativeLayout> </layout> diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index f32a9925..f7b4c548 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -16,7 +16,6 @@ <string name="edit">Edit</string> <string name="endpoint">Endpoint</string> <string name="error_down">Error bringing down WireGuard tunnel</string> - <string name="error_su">WireGuard currently requires root access</string> <string name="error_up">Error bringing up WireGuard tunnel</string> <string name="generate">Generate</string> <string name="hint_automatic">(auto)</string> |