Files
arcanechat-android/res/layout/conversation_item_update.xml
T
Hocuri ee966f9006 Merge the verified-1:1 commits into main (#2752)
* Verified 1:1 chats, Android UI (#2560)

Depends on https://github.com/deltachat/deltachat-core-rust/pull/4315/.

Follow-up for https://github.com/deltachat/deltachat-android/pull/2541.

- Show a "verified" icon on protection changed update messages
- Add C API
- Show a dialog over the input bar not only for contact requests, but also when the protection is broken (using the new method `isHalfBlocked()`)
  - The positive button reads "OK" (as opposed to contact requests where it reads "Accept")
- Add SVG icons, remove PNG one
- Translations
- When tapping on the `DC_INFO_PROTECTION_{EN|DIS}ABLED` message, show more information (for now, it leads to the online preview of my FAQ PR)
- Block loading remote images in the "Full Msg View" not only for contact requests, also when the protection is broken (using the new method `isHalfBlocked()`)
- Show a big verified/crossed-out-verified symbol over the `DC_INFO_PROTECTION_{EN|DIS}ABLED` messages
- Fix a bug that was kind of present before (for contact requests) but only became really visible now:
  - Set a draft with an image (or other attachment)
  - Your chat partner breaks verification
  - Expected: Both the input bar and the draft image are hidden by the input-bar-dialog.
  - Bug behavior (before c31de5bcf): The input bar is hidden, but the draft image stays visible.

* change button order of verification-broken alert (#2621)

Having "OK" in the middle of the buttons is weird. The old order was:

```
End-to-end encryption cannot...
[More Info]  [OK] [Scan QR code]
```

1. _If_ the main purpose of the dialog would be to "Scan QR code",
   the text should point that out more, also the opening button.
   Then, the button position would be correct, however,
   it has to read "Cancel" then.

2. _However_, the main purpose of the dialog is to "Show Info",
   "Scan QR code" is only an optional offering and the button a shortcut only.
   And finishing "Show Info" is better done by a simple "OK".
   Then, the "OK" should be rightmost.

This PR implements the second option, the buttons read as follows afterwards:

```
End-to-end encryption cannot...
[More Info]  [Scan QR code] [OK]
```

* fix: load updated display name when chat protection breaks

* Implement feature flag for verified 1:1 chats

* Update res/values/strings.xml

Co-authored-by: Hocuri <hocuri@gmx.de>

* Update src/org/thoughtcrime/securesms/connect/DcHelper.java

* Make another AlertDialog

* Revert "Implement feature flag for verified 1:1 chats"

This reverts commit 2efd17edfcf14e3cf89a6671df38647b552e5661.

* Fix typo

* email server->email provider

---------

Co-authored-by: bjoern <r10s@b44t.com>
Co-authored-by: adbenitez <asieldbenitez@gmail.com>
2023-10-27 17:02:29 +02:00

77 lines
3.1 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<org.thoughtcrime.securesms.ConversationUpdateItem xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:background="@drawable/conversation_item_background"
android:focusable="true"
android:gravity="center"
android:orientation="vertical"
android:paddingTop="5dp"
android:paddingBottom="7dp"
android:paddingLeft="28dp"
android:paddingRight="28dp">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/verified_icon"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_gravity="center_vertical"
tools:src="@drawable/ic_verified"
android:padding="7dp"
android:visibility="gone" />
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:background="@drawable/conversation_item_update_background"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:gravity="center"
android:orientation="vertical">
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="3dp"
android:paddingBottom="3dp"
android:gravity="center"
android:orientation="horizontal">
<androidx.appcompat.widget.AppCompatImageView
android:id="@+id/app_icon"
android:layout_width="18sp"
android:layout_height="18sp"
android:layout_marginEnd="2dp"
android:layout_marginRight="2dp"
android:layout_gravity="center_vertical"
android:scaleType="centerCrop"
android:visibility="gone" />
<!--Links should be clickable, see https://github.com/deltachat/deltachat-android/issues/1546-->
<org.thoughtcrime.securesms.components.emoji.EmojiTextView
android:id="@+id/conversation_update_body"
style="@style/Delta.Text.UpdateHeader"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:autoLink="web"
android:gravity="center"
android:textColor="?attr/conversation_item_update_text_color"
android:textColorLink="?attr/conversation_item_update_text_color"
tools:text="Gwen Stacy added to group" />
</LinearLayout>
<ImageView android:id="@+id/delivery_indicator"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical|end"
android:layout_marginBottom="6dp"
app:tint="?attr/conversation_item_update_text_color"
android:visibility="gone" />
</LinearLayout>
</org.thoughtcrime.securesms.ConversationUpdateItem>