mirror of
https://github.com/SchildiChat/SchildiChat-android.git
synced 2025-02-09 16:48:54 +01:00
Cleanup
This commit is contained in:
parent
c7241f5755
commit
86f0af0ff2
@ -49,6 +49,7 @@ import im.vector.app.features.crypto.verification.request.VerificationRequestFra
|
|||||||
import im.vector.app.features.home.AvatarRenderer
|
import im.vector.app.features.home.AvatarRenderer
|
||||||
import im.vector.app.features.settings.VectorSettingsActivity
|
import im.vector.app.features.settings.VectorSettingsActivity
|
||||||
import kotlinx.parcelize.Parcelize
|
import kotlinx.parcelize.Parcelize
|
||||||
|
import org.matrix.android.sdk.api.crypto.RoomEncryptionTrustLevel
|
||||||
import org.matrix.android.sdk.api.session.Session
|
import org.matrix.android.sdk.api.session.Session
|
||||||
import org.matrix.android.sdk.api.session.crypto.crosssigning.KEYBACKUP_SECRET_SSSS_NAME
|
import org.matrix.android.sdk.api.session.crypto.crosssigning.KEYBACKUP_SECRET_SSSS_NAME
|
||||||
import org.matrix.android.sdk.api.session.crypto.crosssigning.MASTER_KEY_SSSS_NAME
|
import org.matrix.android.sdk.api.session.crypto.crosssigning.MASTER_KEY_SSSS_NAME
|
||||||
@ -162,23 +163,22 @@ class VerificationBottomSheet : VectorBaseBottomSheetDialogFragment<BottomSheetV
|
|||||||
if (state.sasTransactionState == VerificationTxState.Verified
|
if (state.sasTransactionState == VerificationTxState.Verified
|
||||||
|| state.qrTransactionState == VerificationTxState.Verified
|
|| state.qrTransactionState == VerificationTxState.Verified
|
||||||
|| state.verifiedFromPrivateKeys) {
|
|| state.verifiedFromPrivateKeys) {
|
||||||
views.otherUserShield.setImageResource(R.drawable.ic_shield_trusted)
|
views.otherUserShield.render(RoomEncryptionTrustLevel.Trusted)
|
||||||
} else {
|
} else {
|
||||||
views.otherUserShield.setImageResource(R.drawable.ic_shield_warning)
|
views.otherUserShield.render(RoomEncryptionTrustLevel.Warning)
|
||||||
}
|
}
|
||||||
views.otherUserNameText.text = getString(
|
views.otherUserNameText.text = getString(
|
||||||
if (state.selfVerificationMode) R.string.crosssigning_verify_this_session else R.string.crosssigning_verify_session
|
if (state.selfVerificationMode) R.string.crosssigning_verify_this_session else R.string.crosssigning_verify_session
|
||||||
)
|
)
|
||||||
views.otherUserShield.isVisible = true
|
|
||||||
} else {
|
} else {
|
||||||
avatarRenderer.render(matrixItem, views.otherUserAvatarImageView)
|
avatarRenderer.render(matrixItem, views.otherUserAvatarImageView)
|
||||||
|
|
||||||
if (state.sasTransactionState == VerificationTxState.Verified || state.qrTransactionState == VerificationTxState.Verified) {
|
if (state.sasTransactionState == VerificationTxState.Verified || state.qrTransactionState == VerificationTxState.Verified) {
|
||||||
views.otherUserNameText.text = getString(R.string.verification_verified_user, matrixItem.getBestName())
|
views.otherUserNameText.text = getString(R.string.verification_verified_user, matrixItem.getBestName())
|
||||||
views.otherUserShield.isVisible = true
|
views.otherUserShield.render(RoomEncryptionTrustLevel.Trusted)
|
||||||
} else {
|
} else {
|
||||||
views.otherUserNameText.text = getString(R.string.verification_verify_user, matrixItem.getBestName())
|
views.otherUserNameText.text = getString(R.string.verification_verify_user, matrixItem.getBestName())
|
||||||
views.otherUserShield.isVisible = false
|
views.otherUserShield.render(null)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -28,12 +28,11 @@
|
|||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
tools:src="@tools:sample/avatars" />
|
tools:src="@tools:sample/avatars" />
|
||||||
|
|
||||||
<ImageView
|
<im.vector.app.core.ui.views.ShieldImageView
|
||||||
android:id="@+id/otherUserShield"
|
android:id="@+id/otherUserShield"
|
||||||
android:layout_width="16dp"
|
android:layout_width="16dp"
|
||||||
android:layout_height="16dp"
|
android:layout_height="16dp"
|
||||||
android:importantForAccessibility="no"
|
android:importantForAccessibility="no"
|
||||||
android:src="@drawable/ic_shield_trusted"
|
|
||||||
app:layout_constraintCircle="@+id/otherUserAvatarImageView"
|
app:layout_constraintCircle="@+id/otherUserAvatarImageView"
|
||||||
app:layout_constraintCircleAngle="135"
|
app:layout_constraintCircleAngle="135"
|
||||||
app:layout_constraintCircleRadius="16dp"
|
app:layout_constraintCircleRadius="16dp"
|
||||||
|
@ -69,8 +69,7 @@
|
|||||||
app:layout_constraintCircleAngle="135"
|
app:layout_constraintCircleAngle="135"
|
||||||
app:layout_constraintCircleRadius="20dp"
|
app:layout_constraintCircleRadius="20dp"
|
||||||
tools:alpha="1"
|
tools:alpha="1"
|
||||||
tools:ignore="MissingConstraints"
|
tools:ignore="MissingConstraints" />
|
||||||
tools:src="@drawable/ic_shield_trusted" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/matrixProfileToolbarTitleView"
|
android:id="@+id/matrixProfileToolbarTitleView"
|
||||||
|
@ -41,8 +41,7 @@
|
|||||||
app:layout_constraintCircle="@+id/roomToolbarAvatarImageView"
|
app:layout_constraintCircle="@+id/roomToolbarAvatarImageView"
|
||||||
app:layout_constraintCircleAngle="135"
|
app:layout_constraintCircleAngle="135"
|
||||||
app:layout_constraintCircleRadius="20dp"
|
app:layout_constraintCircleRadius="20dp"
|
||||||
tools:ignore="MissingConstraints"
|
tools:ignore="MissingConstraints" />
|
||||||
tools:src="@drawable/ic_shield_trusted" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/roomToolbarTitleView"
|
android:id="@+id/roomToolbarTitleView"
|
||||||
|
@ -46,8 +46,7 @@
|
|||||||
app:layout_constraintCircle="@+id/roomUploadsToolbarAvatarImageView"
|
app:layout_constraintCircle="@+id/roomUploadsToolbarAvatarImageView"
|
||||||
app:layout_constraintCircleAngle="135"
|
app:layout_constraintCircleAngle="135"
|
||||||
app:layout_constraintCircleRadius="20dp"
|
app:layout_constraintCircleRadius="20dp"
|
||||||
tools:ignore="MissingConstraints"
|
tools:ignore="MissingConstraints" />
|
||||||
tools:src="@drawable/ic_shield_trusted" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/roomUploadsToolbarTitleView"
|
android:id="@+id/roomUploadsToolbarTitleView"
|
||||||
|
@ -88,8 +88,7 @@
|
|||||||
android:id="@+id/itemDeviceTrustLevelIcon"
|
android:id="@+id/itemDeviceTrustLevelIcon"
|
||||||
android:layout_width="50dp"
|
android:layout_width="50dp"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:padding="8dp"
|
android:padding="8dp" />
|
||||||
tools:src="@drawable/ic_shield_trusted" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
|
@ -33,8 +33,7 @@
|
|||||||
app:layout_constraintCircle="@+id/matrixItemAvatar"
|
app:layout_constraintCircle="@+id/matrixItemAvatar"
|
||||||
app:layout_constraintCircleAngle="135"
|
app:layout_constraintCircleAngle="135"
|
||||||
app:layout_constraintCircleRadius="16dp"
|
app:layout_constraintCircleRadius="16dp"
|
||||||
tools:ignore="MissingConstraints"
|
tools:ignore="MissingConstraints" />
|
||||||
tools:src="@drawable/ic_shield_trusted" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/matrixItemTitle"
|
android:id="@+id/matrixItemTitle"
|
||||||
|
@ -33,8 +33,7 @@
|
|||||||
app:layout_constraintCircle="@+id/matrixItemAvatar"
|
app:layout_constraintCircle="@+id/matrixItemAvatar"
|
||||||
app:layout_constraintCircleAngle="135"
|
app:layout_constraintCircleAngle="135"
|
||||||
app:layout_constraintCircleRadius="16dp"
|
app:layout_constraintCircleRadius="16dp"
|
||||||
tools:ignore="MissingConstraints"
|
tools:ignore="MissingConstraints" />
|
||||||
tools:src="@drawable/ic_shield_trusted" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/matrixItemTitle"
|
android:id="@+id/matrixItemTitle"
|
||||||
|
@ -67,8 +67,7 @@
|
|||||||
app:layout_constraintCircle="@id/roomAvatarContainer"
|
app:layout_constraintCircle="@id/roomAvatarContainer"
|
||||||
app:layout_constraintCircleAngle="135"
|
app:layout_constraintCircleAngle="135"
|
||||||
app:layout_constraintCircleRadius="28dp"
|
app:layout_constraintCircleRadius="28dp"
|
||||||
tools:ignore="MissingConstraints"
|
tools:ignore="MissingConstraints" />
|
||||||
tools:src="@drawable/ic_shield_trusted" />
|
|
||||||
|
|
||||||
<!-- Margin bottom does not work, so I use space -->
|
<!-- Margin bottom does not work, so I use space -->
|
||||||
<Space
|
<Space
|
||||||
|
@ -12,10 +12,10 @@
|
|||||||
android:id="@+id/messageFilee2eIcon"
|
android:id="@+id/messageFilee2eIcon"
|
||||||
android:layout_width="14dp"
|
android:layout_width="14dp"
|
||||||
android:layout_height="14dp"
|
android:layout_height="14dp"
|
||||||
android:src="@drawable/ic_shield_black"
|
|
||||||
android:visibility="gone"
|
android:visibility="gone"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
tools:src="@drawable/ic_shield_black"
|
||||||
tools:visibility="visible" />
|
tools:visibility="visible" />
|
||||||
|
|
||||||
<!-- the media type -->
|
<!-- the media type -->
|
||||||
|
@ -11,12 +11,12 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
tools:drawableStart="@drawable/ic_shield_trusted"
|
|
||||||
android:drawablePadding="6dp"
|
android:drawablePadding="6dp"
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:textColor="?riotx_text_primary"
|
android:textColor="?riotx_text_primary"
|
||||||
android:textSize="15sp"
|
android:textSize="15sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
|
tools:drawableStart="@drawable/ic_shield_trusted"
|
||||||
tools:text="@string/sas_verified" />
|
tools:text="@string/sas_verified" />
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<im.vector.app.core.ui.views.ShieldImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
<im.vector.app.core.ui.views.ShieldImageView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools"
|
|
||||||
android:id="@+id/itemVerificationBigImage"
|
android:id="@+id/itemVerificationBigImage"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="180dp"
|
android:layout_height="180dp"
|
||||||
android:layout_margin="8dp"
|
android:layout_margin="8dp" />
|
||||||
tools:src="@drawable/ic_shield_trusted" />
|
|
||||||
|
@ -37,8 +37,7 @@
|
|||||||
app:layout_constraintCircle="@+id/memberProfileAvatarView"
|
app:layout_constraintCircle="@+id/memberProfileAvatarView"
|
||||||
app:layout_constraintCircleAngle="135"
|
app:layout_constraintCircleAngle="135"
|
||||||
app:layout_constraintCircleRadius="64dp"
|
app:layout_constraintCircleRadius="64dp"
|
||||||
tools:ignore="MissingConstraints"
|
tools:ignore="MissingConstraints" />
|
||||||
tools:src="@drawable/ic_shield_trusted" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/memberProfileNameView"
|
android:id="@+id/memberProfileNameView"
|
||||||
|
@ -27,8 +27,7 @@
|
|||||||
app:layout_constraintCircle="@+id/roomProfileAvatarView"
|
app:layout_constraintCircle="@+id/roomProfileAvatarView"
|
||||||
app:layout_constraintCircleAngle="135"
|
app:layout_constraintCircleAngle="135"
|
||||||
app:layout_constraintCircleRadius="64dp"
|
app:layout_constraintCircleRadius="64dp"
|
||||||
tools:ignore="MissingConstraints"
|
tools:ignore="MissingConstraints" />
|
||||||
tools:src="@drawable/ic_shield_trusted" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/roomProfileNameView"
|
android:id="@+id/roomProfileNameView"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user