Skip to content

Commit

Permalink
Add certification description in DetailedContactBottomSheetDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasBourdin88 committed Jun 24, 2024
1 parent 65a144b commit 0ba1532
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import android.os.Bundle
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
import androidx.core.view.isVisible
import androidx.fragment.app.activityViewModels
import androidx.navigation.fragment.navArgs
import com.infomaniak.lib.core.utils.safeBinding
Expand Down Expand Up @@ -53,7 +54,11 @@ class DetailedContactBottomSheetDialog : ActionsBottomSheetDialog() {

override fun onViewCreated(view: View, savedInstanceState: Bundle?) = with(binding) {
super.onViewCreated(view, savedInstanceState)
contactDetails.setCorrespondent(navigationArgs.recipient, navigationArgs.bimi)

val bimi = navigationArgs.bimi
containerInfoCertified.isVisible = bimi?.isCertified == true
contactDetails.setCorrespondent(navigationArgs.recipient, bimi)

setupListeners()
}

Expand Down
23 changes: 22 additions & 1 deletion app/src/main/res/layout/bottom_sheet_detailed_contact.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,32 @@
tools:email="steph.guy@ik.me"
tools:name="@tools:sample/full_names" />

<LinearLayout
android:id="@+id/containerInfoCertified"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_margin="@dimen/marginStandardMedium"
android:gravity="center_vertical">

<ImageView
android:id="@+id/iconCertified"
android:layout_width="16dp"
android:layout_height="16dp"
android:layout_marginEnd="@dimen/marginStandardMedium"
android:src="@drawable/ic_certified"
tools:ignore="ContentDescription" />

<TextView
style="@style/Label"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/expeditorAuthenticationDescription" />
</LinearLayout>

<com.infomaniak.mail.ui.main.thread.actions.ActionItemView
android:id="@+id/writeMail"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/marginStandardMedium"
app:icon="@drawable/ic_contact_action_write"
app:text="@string/contactActionWriteEmail"
app:visibleDivider="false" />
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
<string name="errorUnableToCreateFolder">Ordner kann nicht erstellt werden</string>
<string name="errorUnableToFlushFolder">Der Ordner kann nicht geleert werden</string>
<string name="errorUserAlreadySynchronized">Benutzer ist bereits synchronisiert</string>
<string name="expeditorAuthenticationDescription">Die Herkunft dieses Absenders wurde authentifiziert.</string>
<string name="externalDialogConfirmButton">Ich habe verstanden</string>
<plurals name="externalDialogDescriptionExpeditor">
<item quantity="one">Der Absender %s gehört nicht zu Ihrer Organisation oder Ihren Kontakten. Seien Sie vorsichtig, wenn Sie sensible Informationen weitergeben.</item>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
<string name="errorUnableToCreateFolder">No se puede crear la carpeta</string>
<string name="errorUnableToFlushFolder">Imposible vaciar la carpeta</string>
<string name="errorUserAlreadySynchronized">El usuario ya está sincronizado</string>
<string name="expeditorAuthenticationDescription">Se ha autentificado el origen del remitente.</string>
<string name="externalDialogConfirmButton">Comprendo</string>
<plurals name="externalDialogDescriptionExpeditor">
<item quantity="one">El remitente %s no forma parte de tu organización ni de tus contactos. Ten cuidado si compartes información sensible.</item>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,7 @@
<string name="errorUnableToCreateFolder">Impossible de créer le dossier</string>
<string name="errorUnableToFlushFolder">Impossible de vider le dossier</string>
<string name="errorUserAlreadySynchronized">L’utilisateur est déjà synchronisé</string>
<string name="expeditorAuthenticationDescription">La provenance de cet expéditeur a été authentifiée.</string>
<string name="externalDialogConfirmButton">J’ai compris</string>
<plurals name="externalDialogDescriptionExpeditor">
<item quantity="one">L’expéditeur %s ne fait pas partie de votre organisation ni de vos contacts. Soyez vigilant si vous partagez des informations sensibles.</item>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@
<string name="errorUnableToCreateFolder">Impossibile creare la cartella</string>
<string name="errorUnableToFlushFolder">Impossibile svuotare la cartella</string>
<string name="errorUserAlreadySynchronized">L’utente è già sincronizzato</string>
<string name="expeditorAuthenticationDescription">L’origine del mittente è stata autenticata.</string>
<string name="externalDialogConfirmButton">Capisco</string>
<plurals name="externalDialogDescriptionExpeditor">
<item quantity="one">Il mittente %s non fa parte della vostra organizzazione o dei vostri contatti. Fate attenzione se state condividendo informazioni sensibili.</item>
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@
<string name="errorUnableToCreateFolder">Unable to create the folder</string>
<string name="errorUnableToFlushFolder">Folder cannot be emptied</string>
<string name="errorUserAlreadySynchronized">User is already synchronized</string>
<string name="expeditorAuthenticationDescription">The sender’s origin has been authenticated.</string>
<string name="externalDialogConfirmButton">I understand</string>
<plurals name="externalDialogDescriptionExpeditor">
<item quantity="one">The sender %s is not part of your organization or your contacts. Be careful if you are sharing sensitive information.</item>
Expand Down

0 comments on commit 0ba1532

Please sign in to comment.