-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3733 from element-hq/feature/bma/incomingVerifica…
…tion Incoming session verification
- Loading branch information
Showing
85 changed files
with
2,272 additions
and
462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
...in/kotlin/io/element/android/features/verifysession/api/IncomingVerificationEntryPoint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright 2024 New Vector Ltd. | ||
* | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
* Please see LICENSE in the repository root for full details. | ||
*/ | ||
|
||
package io.element.android.features.verifysession.api | ||
|
||
import com.bumble.appyx.core.modality.BuildContext | ||
import com.bumble.appyx.core.node.Node | ||
import com.bumble.appyx.core.plugin.Plugin | ||
import io.element.android.libraries.architecture.FeatureEntryPoint | ||
import io.element.android.libraries.architecture.NodeInputs | ||
import io.element.android.libraries.matrix.api.verification.SessionVerificationRequestDetails | ||
|
||
interface IncomingVerificationEntryPoint : FeatureEntryPoint { | ||
data class Params( | ||
val sessionVerificationRequestDetails: SessionVerificationRequestDetails, | ||
) : NodeInputs | ||
|
||
fun nodeBuilder(parentNode: Node, buildContext: BuildContext): NodeBuilder | ||
|
||
interface NodeBuilder { | ||
fun callback(callback: Callback): NodeBuilder | ||
fun params(params: Params): NodeBuilder | ||
fun build(): Node | ||
} | ||
|
||
interface Callback : Plugin { | ||
fun onDone() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 0 additions & 95 deletions
95
...n/kotlin/io/element/android/features/verifysession/impl/VerifySelfSessionStateProvider.kt
This file was deleted.
Oops, something went wrong.
40 changes: 40 additions & 0 deletions
40
...ent/android/features/verifysession/impl/incoming/DefaultIncomingVerificationEntryPoint.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* Copyright 2024 New Vector Ltd. | ||
* | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
* Please see LICENSE in the repository root for full details. | ||
*/ | ||
|
||
package io.element.android.features.verifysession.impl.incoming | ||
|
||
import com.bumble.appyx.core.modality.BuildContext | ||
import com.bumble.appyx.core.node.Node | ||
import com.bumble.appyx.core.plugin.Plugin | ||
import com.squareup.anvil.annotations.ContributesBinding | ||
import io.element.android.features.verifysession.api.IncomingVerificationEntryPoint | ||
import io.element.android.libraries.architecture.createNode | ||
import io.element.android.libraries.di.AppScope | ||
import javax.inject.Inject | ||
|
||
@ContributesBinding(AppScope::class) | ||
class DefaultIncomingVerificationEntryPoint @Inject constructor() : IncomingVerificationEntryPoint { | ||
override fun nodeBuilder(parentNode: Node, buildContext: BuildContext): IncomingVerificationEntryPoint.NodeBuilder { | ||
val plugins = ArrayList<Plugin>() | ||
|
||
return object : IncomingVerificationEntryPoint.NodeBuilder { | ||
override fun callback(callback: IncomingVerificationEntryPoint.Callback): IncomingVerificationEntryPoint.NodeBuilder { | ||
plugins += callback | ||
return this | ||
} | ||
|
||
override fun params(params: IncomingVerificationEntryPoint.Params): IncomingVerificationEntryPoint.NodeBuilder { | ||
plugins += params | ||
return this | ||
} | ||
|
||
override fun build(): Node { | ||
return parentNode.createNode<IncomingVerificationNode>(buildContext, plugins) | ||
} | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
.../io/element/android/features/verifysession/impl/incoming/IncomingVerificationNavigator.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* | ||
* Copyright 2024 New Vector Ltd. | ||
* | ||
* SPDX-License-Identifier: AGPL-3.0-only | ||
* Please see LICENSE in the repository root for full details. | ||
*/ | ||
|
||
package io.element.android.features.verifysession.impl.incoming | ||
|
||
fun interface IncomingVerificationNavigator { | ||
fun onFinish() | ||
} |
Oops, something went wrong.