diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-04-28 04:45:17 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-04-28 04:51:43 +0200 |
commit | 63071f57b7b501c23843f502a5d2a1ac83338bc7 (patch) | |
tree | 21a9a0f4de77b67669949534c27e033d1ee896c3 /app/src/main/res/layout/tunnel_detail_peer.xml | |
parent | Do not do DNS lookups for IPs (diff) | |
download | wireguard-android-63071f57b7b501c23843f502a5d2a1ac83338bc7.tar.xz wireguard-android-63071f57b7b501c23843f502a5d2a1ac83338bc7.zip |
Use validation instead of two-way binding
This is insane, but it appears to be working. We essentially store
things in a separate class for editing, and then commit it back at a
given time.
This business with onViewStateRestored in both TunnelEditorFragment and
in TunnelDetailFragment is buggy and likely wrong.
In general TunnelEditorFragment should probably be rewritten. The
relationship with the changed name is not clear.
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'app/src/main/res/layout/tunnel_detail_peer.xml')
-rw-r--r-- | app/src/main/res/layout/tunnel_detail_peer.xml | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/app/src/main/res/layout/tunnel_detail_peer.xml b/app/src/main/res/layout/tunnel_detail_peer.xml index bde89390..d2240e31 100644 --- a/app/src/main/res/layout/tunnel_detail_peer.xml +++ b/app/src/main/res/layout/tunnel_detail_peer.xml @@ -6,12 +6,8 @@ <import type="com.wireguard.android.util.ClipboardUtils" /> <variable - name="collection" - type="android.databinding.ObservableList<com.wireguard.config.Peer>" /> - - <variable name="item" - type="com.wireguard.config.Peer" /> + type="com.wireguard.config.Peer.Observable" /> </data> <RelativeLayout @@ -69,7 +65,7 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/allowed_ips_label" - android:text="@{item.allowedIPsString}" /> + android:text="@{item.allowedIPs}" /> <TextView android:id="@+id/endpoint_label" @@ -86,6 +82,6 @@ android:layout_width="match_parent" android:layout_height="wrap_content" android:layout_below="@+id/endpoint_label" - android:text="@{item.endpointString}" /> + android:text="@{item.endpoint}" /> </RelativeLayout> </layout> |