Benoit Marty
5 months ago
committed by
GitHub
15 changed files with 147 additions and 13 deletions
@ -0,0 +1 @@
@@ -0,0 +1 @@
|
||||
Add support for expected decryption errors due to membership (UX and analytics). |
@ -0,0 +1,46 @@
@@ -0,0 +1,46 @@
|
||||
/* |
||||
* Copyright (c) 2024 New Vector Ltd |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0 |
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package io.element.android.features.messages.impl.timeline.model.event |
||||
|
||||
import androidx.compose.ui.tooling.preview.PreviewParameterProvider |
||||
import io.element.android.libraries.matrix.api.timeline.item.event.UnableToDecryptContent |
||||
import io.element.android.libraries.matrix.api.timeline.item.event.UtdCause |
||||
|
||||
open class TimelineItemEncryptedContentProvider : PreviewParameterProvider<TimelineItemEncryptedContent> { |
||||
override val values: Sequence<TimelineItemEncryptedContent> |
||||
get() = sequenceOf( |
||||
aTimelineItemEncryptedContent(), |
||||
aTimelineItemEncryptedContent( |
||||
data = UnableToDecryptContent.Data.MegolmV1AesSha2( |
||||
sessionId = "sessionId", |
||||
utdCause = UtdCause.Membership, |
||||
) |
||||
), |
||||
aTimelineItemEncryptedContent( |
||||
data = UnableToDecryptContent.Data.MegolmV1AesSha2( |
||||
sessionId = "sessionId", |
||||
utdCause = UtdCause.Unknown, |
||||
) |
||||
), |
||||
) |
||||
} |
||||
|
||||
private fun aTimelineItemEncryptedContent( |
||||
data: UnableToDecryptContent.Data = UnableToDecryptContent.Data.Unknown |
||||
) = TimelineItemEncryptedContent( |
||||
data = data |
||||
) |
@ -0,0 +1,22 @@
@@ -0,0 +1,22 @@
|
||||
/* |
||||
* Copyright (c) 2024 New Vector Ltd |
||||
* |
||||
* Licensed under the Apache License, Version 2.0 (the "License"); |
||||
* you may not use this file except in compliance with the License. |
||||
* You may obtain a copy of the License at |
||||
* |
||||
* http://www.apache.org/licenses/LICENSE-2.0 |
||||
* |
||||
* Unless required by applicable law or agreed to in writing, software |
||||
* distributed under the License is distributed on an "AS IS" BASIS, |
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
* See the License for the specific language governing permissions and |
||||
* limitations under the License. |
||||
*/ |
||||
|
||||
package io.element.android.libraries.matrix.api.timeline.item.event |
||||
|
||||
enum class UtdCause { |
||||
Unknown, |
||||
Membership, |
||||
} |
Binary file not shown.
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1 |
||||
oid sha256:42816394d24d8bad66d38b97b1ffdb180b4c44ae205397d817a828e72649163b |
||||
size 11761 |
Binary file not shown.
Binary file not shown.
@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1 |
||||
oid sha256:4364b6c6fe2d308ba89492d8444138fd85c63e378fb538351dd56237cd846a7e |
||||
size 11616 |
Loading…
Reference in new issue