From 1b8a437b1e5b0293c4d37d1e5c316ffbfefd5851 Mon Sep 17 00:00:00 2001 From: Daniel Gultsch Date: Sun, 18 Feb 2018 18:38:46 +0100 Subject: [PATCH] create dedicated button to enable undecided accounts --- art/md_switch_thumb_disable.svg | 156 ----------------- art/md_switch_thumb_off_normal.svg | 153 ----------------- art/md_switch_thumb_off_pressed.svg | 159 ----------------- art/md_switch_thumb_on_normal.svg | 146 ---------------- art/md_switch_thumb_on_pressed.svg | 162 ------------------ art/render.rb | 5 - .../siacs/conversations/ui/OmemoActivity.java | 11 +- .../ic_new_releases_black_24dp.png | Bin 0 -> 384 bytes .../ic_new_releases_white_24dp.png | Bin 0 -> 395 bytes .../ic_new_releases_black_24dp.png | Bin 0 -> 277 bytes .../ic_new_releases_white_24dp.png | Bin 0 -> 287 bytes .../ic_new_releases_black_24dp.png | Bin 0 -> 480 bytes .../ic_new_releases_white_24dp.png | Bin 0 -> 498 bytes .../ic_new_releases_black_24dp.png | Bin 0 -> 699 bytes .../ic_new_releases_white_24dp.png | Bin 0 -> 736 bytes .../ic_new_releases_black_24dp.png | Bin 0 -> 897 bytes .../ic_new_releases_white_24dp.png | Bin 0 -> 932 bytes src/main/res/layout/activity_muc_details.xml | 2 +- src/main/res/layout/contact.xml | 2 +- src/main/res/layout/contact_key.xml | 20 ++- src/main/res/values/attrs.xml | 1 + src/main/res/values/dimens.xml | 2 + src/main/res/values/themes.xml | 2 + 23 files changed, 27 insertions(+), 794 deletions(-) delete mode 100644 art/md_switch_thumb_disable.svg delete mode 100644 art/md_switch_thumb_off_normal.svg delete mode 100644 art/md_switch_thumb_off_pressed.svg delete mode 100644 art/md_switch_thumb_on_normal.svg delete mode 100644 art/md_switch_thumb_on_pressed.svg create mode 100644 src/main/res/drawable-hdpi/ic_new_releases_black_24dp.png create mode 100644 src/main/res/drawable-hdpi/ic_new_releases_white_24dp.png create mode 100644 src/main/res/drawable-mdpi/ic_new_releases_black_24dp.png create mode 100644 src/main/res/drawable-mdpi/ic_new_releases_white_24dp.png create mode 100644 src/main/res/drawable-xhdpi/ic_new_releases_black_24dp.png create mode 100644 src/main/res/drawable-xhdpi/ic_new_releases_white_24dp.png create mode 100644 src/main/res/drawable-xxhdpi/ic_new_releases_black_24dp.png create mode 100644 src/main/res/drawable-xxhdpi/ic_new_releases_white_24dp.png create mode 100644 src/main/res/drawable-xxxhdpi/ic_new_releases_black_24dp.png create mode 100644 src/main/res/drawable-xxxhdpi/ic_new_releases_white_24dp.png diff --git a/art/md_switch_thumb_disable.svg b/art/md_switch_thumb_disable.svg deleted file mode 100644 index efd83c2d0..000000000 --- a/art/md_switch_thumb_disable.svg +++ /dev/null @@ -1,156 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/art/md_switch_thumb_off_normal.svg b/art/md_switch_thumb_off_normal.svg deleted file mode 100644 index 25d1761db..000000000 --- a/art/md_switch_thumb_off_normal.svg +++ /dev/null @@ -1,153 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/art/md_switch_thumb_off_pressed.svg b/art/md_switch_thumb_off_pressed.svg deleted file mode 100644 index 002b47815..000000000 --- a/art/md_switch_thumb_off_pressed.svg +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/art/md_switch_thumb_on_normal.svg b/art/md_switch_thumb_on_normal.svg deleted file mode 100644 index 5e8f90f39..000000000 --- a/art/md_switch_thumb_on_normal.svg +++ /dev/null @@ -1,146 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/art/md_switch_thumb_on_pressed.svg b/art/md_switch_thumb_on_pressed.svg deleted file mode 100644 index e0331e7b7..000000000 --- a/art/md_switch_thumb_on_pressed.svg +++ /dev/null @@ -1,162 +0,0 @@ - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/art/render.rb b/art/render.rb index 1e36bba90..3ef6ea4c7 100755 --- a/art/render.rb +++ b/art/render.rb @@ -57,11 +57,6 @@ images = { 'ic_notifications_paused_white80.svg' => ['ic_notifications_paused_white80', 24], 'ic_notifications_white80.svg' => ['ic_notifications_white80', 24], 'ic_verified_fingerprint.svg' => ['ic_verified_fingerprint', 36], - 'md_switch_thumb_disable.svg' => ['switch_thumb_disable', 48], - 'md_switch_thumb_off_normal.svg' => ['switch_thumb_off_normal', 48], - 'md_switch_thumb_off_pressed.svg' => ['switch_thumb_off_pressed', 48], - 'md_switch_thumb_on_normal.svg' => ['switch_thumb_on_normal', 48], - 'md_switch_thumb_on_pressed.svg' => ['switch_thumb_on_pressed', 48], 'message_bubble_received.svg' => ['message_bubble_received.9', 0], 'message_bubble_received_grey.svg' => ['message_bubble_received_grey.9', 0], 'message_bubble_received_dark.svg' => ['message_bubble_received_dark.9', 0], diff --git a/src/main/java/eu/siacs/conversations/ui/OmemoActivity.java b/src/main/java/eu/siacs/conversations/ui/OmemoActivity.java index fb59257ca..0d8b69ee6 100644 --- a/src/main/java/eu/siacs/conversations/ui/OmemoActivity.java +++ b/src/main/java/eu/siacs/conversations/ui/OmemoActivity.java @@ -9,6 +9,7 @@ import android.view.ContextMenu; import android.view.MenuItem; import android.view.View; import android.widget.CompoundButton; +import android.widget.ImageButton; import android.widget.ImageView; import android.widget.LinearLayout; import android.widget.TextView; @@ -130,6 +131,7 @@ public abstract class OmemoActivity extends XmppActivity { View view = getLayoutInflater().inflate(R.layout.contact_key, keys, false); TextView key = view.findViewById(R.id.key); TextView keyType = view.findViewById(R.id.key_type); + ImageButton enableUndecided = view.findViewById(R.id.button_enable_device); if (Config.X509_VERIFICATION && status.getTrust() == FingerprintStatus.Trust.VERIFIED_X509) { key.setOnClickListener(v -> showX509Certificate(account,fingerprint)); keyType.setOnClickListener(v -> showX509Certificate(account,fingerprint)); @@ -159,12 +161,13 @@ public abstract class OmemoActivity extends XmppActivity { trustToggle.setVisibility(View.VISIBLE); trustToggle.setOnCheckedChangeListener(onCheckedChangeListener); if (status.getTrust() == FingerprintStatus.Trust.UNDECIDED && undecidedNeedEnablement) { - trustToggle.setOnClickListener(v -> { + enableUndecided.setVisibility(View.VISIBLE); + enableUndecided.setOnClickListener(v -> { account.getAxolotlService().setFingerprintTrust(fingerprint,FingerprintStatus.createActive(false)); - v.setEnabled(true); - v.setOnClickListener(null); + enableUndecided.setVisibility(View.GONE); + trustToggle.setVisibility(View.VISIBLE); }); - trustToggle.setEnabled(false); + trustToggle.setVisibility(View.GONE); } else { trustToggle.setOnClickListener(null); trustToggle.setEnabled(true); diff --git a/src/main/res/drawable-hdpi/ic_new_releases_black_24dp.png b/src/main/res/drawable-hdpi/ic_new_releases_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..db0b316314e32c8220e43cf079700188adfabc37 GIT binary patch literal 384 zcmV-`0e}99P)Yk6o&D~uA;3txpdIdx{J0&P;WpKx)j_55mdxKH;@Z(iLHY-qK=&eiQpwvu!6R@ z*xEXn9G48C9$LT8IP~}KFPxB^6GljZW0FLrIAsw-2_6vIRLKF5dxC*QJ{~S*(x_H>K@8JiSt}CrXhk_hO$`T! z8lq;7A5w@K2LK0AGmfHXT+~L@FfOX2II$XSpFSl5t0JEbB8v17t0JLGo=}DsVqGLO z$%I8T<0*nXUBv2z6h2rYViO;+$QSGMIj}0)Me$@jS{>D=@x$)GKYq0HajlWHxE9+A z&&D;66j7xqs$c^VfzLK;**;kQax9xr+Dr5o3a?U%#9b*_OaKt20 e6CAR@$oK}?|>Eos`2 z_tSLYVh8Q~x($84`v=bXoqNue{{uM=i6fyTIA$KvBj|~72ehb=K@c*W(FSV7Y@!_k zd@i}dCt%AWn&cJGX)^J1(K&;t3>QtaL77{82GOHNi6Ti|w9GSB>MUv^>}aA4I#oP8 zs_4vo7bVc~5CjjMQLWisv#6!NTHP$V*F;B7rS0~M3iwW<9&2Gyo-R0vphGqgrD%e) z2pXgUQ6n0Wkfj4o0}1aegqyui4;MaJ?SK9~T-eqI^3htFK9ItPx!G;x4?o)3sMg3z zREuqiC#*b>*Oz~iA|+}=m;W^<6qx$$IVweSAYX{PpX`fJv72r`5oOW{LYh@$ZLM218!`T~+KL6_IqidX;u002ovPDHLkV1kY!qNe}= literal 0 HcmV?d00001 diff --git a/src/main/res/drawable-mdpi/ic_new_releases_black_24dp.png b/src/main/res/drawable-mdpi/ic_new_releases_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..f8f4f111e89e52dbcccf6ff574df88683d31e87e GIT binary patch literal 277 zcmV+w0qXvVP)Zds8yzenP1FHbmlmeE0s9h-yT&ulX@+T*f+#{_l*zw&6zHBKpI51I5Emp?% zWV}j&6B+kXCZx<;8E0W|njd!>2G0tBz8fhFl93*8ECs=@Ltq#O`6Kp?q*(v-017Ws z;FEa(IPZ3?JcPkr*U^~D*f&;5Eq;2mt3hGAIo@iU=DIA zS3%052Jcv98a$#C1l_#`=O#F7f`Hrvuecg4at9`WgoO&sVHAM40`X`N)kjJg(`|hu z!SROG3(L)Gy_j~b!jlOerap~agCkN3`ugFSgYNTo>`~Irv%}Jq1v;@-^b5}wA=_M1 l@WIM3(4W9MTZjRy`2%*(KG7s2s%`)P002ovPDHLkV1kSAcWD3s literal 0 HcmV?d00001 diff --git a/src/main/res/drawable-xhdpi/ic_new_releases_black_24dp.png b/src/main/res/drawable-xhdpi/ic_new_releases_black_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..917b6cf4a54d826a6e9ca4736bfd3765d3269254 GIT binary patch literal 480 zcmV<60U!Q}P)q{{Q_PV2DUqNFxo(RD-IVK!STcZEvWs$^N-}U#u0u%%4$4(c zGO$ao14#ykNYLQwUv{f^T{r!QGn!=Jl3aI0 zf^IeY*)l2DY_lI;ZK_60`YIaeiwWlpXjQ;=M@)-?J$6{H72E2MD9|sR8gy0^=(L8l zcqf+WjfxTmMb^A~1`HT8pPl`)TS?kfa00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T1qr#%`N9$`sCON-4@+LU%IU$HN*9mz6l-wL)wg(*Csb2K zN7CF@tXk%{G7cyFk)W9COeCC-5x}yeNPM3-Ljb2dPVyd!uMPzR#OS7$RJPGcls;6f hr3@1#tU_H@)<3noC-g+HB1`}P002ovPDHLkV1l(xH0=NY literal 0 HcmV?d00001 diff --git a/src/main/res/drawable-xxhdpi/ic_new_releases_white_24dp.png b/src/main/res/drawable-xxhdpi/ic_new_releases_white_24dp.png new file mode 100644 index 0000000000000000000000000000000000000000..25b278a55f1bf78ca6248ef7f4f7b83335125317 GIT binary patch literal 736 zcmV<60w4W}P)r+$wXmQT21N`;25o|BQHxr*F+rv= zq9GSy5U54dV_5?>kS=nfWxmFtuhqnij^nv^?)l#<%y*V^#oyx0z2}}YMxjFTQOz0* zg;7NnhS_0Ye!OOe9vX9A<0HrneG;H%QbjmR$(+wUoaYm%nskGf@`LooxJBjvPb=vl zPI@uCdO^3DTY_#HXrP+}b8FWL+Q1ZMo1jJ?D2$b!>jE9ZY6o*8mJSg9;<=w zAXSGN=rU4WRGmXoHLHPkW2%h5HJ48fv{?*Prv_Rn23nzdW1JQNjjP|OM?^p|bx=eE zG^7q15COeW1+|Gy>Q)s{3xCBxN&E|e8kqz!5R9`e7ibf|K@+RLD0paHzuzV_uraiVXO z&39w0C607s)Z}_})H9A`f7rUv!}Typq)Kv7W%<#HR2NhiXm63IUwy^+QRHj?P8~Gr zu0?*4+g^jp-1efl#ci+Bd&EFH)j%iRwjFZ?sV*(jExk^pdZGquA;eE~7o!WmnT_-H zoZ_MF8|PCDahIc1olTTOeKMnE{!)jkyqT>Ls39Ieb zb;S7!D~0r(xz<^j+7qnR2g-gIPwgmeL4d^|$U&aXO#WQ|LP{B>cNN*UAUXZ~t zQhnxJmVZ~mX+Dt3FY#lPev$<7<-BG)-6RNONPyN+t#n-_t7Sl1M*+0xK>q;59vup3 S^|NklM8kHtQ8V-HG%QYZ#Dz+?Rn+yF z<*Mpc-RW~t*A^w4qb3?O=n2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Wg!o$2v45y0n z4pa2t*FE^!&M+_W4QVP-ny*&*fbFO%CoL!6su5;)9f + android:paddingLeft="@dimen/avatar_item_distance"> + android:paddingLeft="@dimen/avatar_item_distance" > + diff --git a/src/main/res/values/attrs.xml b/src/main/res/values/attrs.xml index 919bcc7a3..87ea36f8d 100644 --- a/src/main/res/values/attrs.xml +++ b/src/main/res/values/attrs.xml @@ -61,6 +61,7 @@ + diff --git a/src/main/res/values/dimens.xml b/src/main/res/values/dimens.xml index 98161fcc1..5bd04d25e 100644 --- a/src/main/res/values/dimens.xml +++ b/src/main/res/values/dimens.xml @@ -6,7 +6,9 @@ 8dp 8dp 12dp + 48dp 11sp 224dp 32dp + 16dp diff --git a/src/main/res/values/themes.xml b/src/main/res/values/themes.xml index c374265ce..4cdf905b3 100644 --- a/src/main/res/values/themes.xml +++ b/src/main/res/values/themes.xml @@ -78,6 +78,7 @@ @drawable/ic_notifications_off_black_24dp @drawable/ic_notifications_paused_black_24dp @drawable/ic_notifications_none_black_24dp + @drawable/ic_new_releases_black_24dp