Remodel the Model
- The configuration and crypto model is now entirely independent of Android classes other than Nullable and TextUtils. - Model classes are immutable and use builders that enforce the appropriate optional/required attributes. - The Android config proxies (for Parcelable and databinding) are moved to the Android side of the codebase, and are designed to be safe for two-way databinding. This allows proper observability in TunnelDetailFragment. - Various robustness fixes and documentation updates to helper classes. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
committed by
Jason A. Donenfeld
parent
a264f7ab36
commit
d1e85633fb
@@ -8,7 +8,7 @@
|
||||
|
||||
<variable
|
||||
name="item"
|
||||
type="com.wireguard.config.Peer.Observable" />
|
||||
type="com.wireguard.config.Peer" />
|
||||
</data>
|
||||
|
||||
<android.support.v7.widget.CardView
|
||||
@@ -54,7 +54,7 @@
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
android:onClick="@{ClipboardUtils::copyTextView}"
|
||||
android:text="@{item.publicKey}" />
|
||||
android:text="@{item.publicKey.toBase64}" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/allowed_ips_label"
|
||||
@@ -71,7 +71,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_below="@+id/allowed_ips_label"
|
||||
android:text="@{item.allowedIPs}" />
|
||||
android:text="@{item.allowedIps}" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/endpoint_label"
|
||||
|
||||
Reference in New Issue
Block a user