Formats entire project
This commit is contained in:
parent
7f3e72b9cb
commit
de899bbb18
@ -108,12 +108,14 @@ class FlowRoom(private val room: Room) {
|
|||||||
room.getAllThreadSummaries()
|
room.getAllThreadSummaries()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun liveThreadList(): Flow<List<ThreadRootEvent>> {
|
fun liveThreadList(): Flow<List<ThreadRootEvent>> {
|
||||||
return room.getAllThreadsLive().asFlow()
|
return room.getAllThreadsLive().asFlow()
|
||||||
.startWith(room.coroutineDispatchers.io) {
|
.startWith(room.coroutineDispatchers.io) {
|
||||||
room.getAllThreads()
|
room.getAllThreads()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun liveLocalUnreadThreadList(): Flow<List<ThreadRootEvent>> {
|
fun liveLocalUnreadThreadList(): Flow<List<ThreadRootEvent>> {
|
||||||
return room.getMarkedThreadNotificationsLive().asFlow()
|
return room.getMarkedThreadNotificationsLive().asFlow()
|
||||||
.startWith(room.coroutineDispatchers.io) {
|
.startWith(room.coroutineDispatchers.io) {
|
||||||
|
@ -110,11 +110,13 @@ class XSigningTest : InstrumentedTest {
|
|||||||
}
|
}
|
||||||
}, it)
|
}, it)
|
||||||
}
|
}
|
||||||
testHelper.doSync<Unit> { bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor {
|
testHelper.doSync<Unit> {
|
||||||
|
bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor {
|
||||||
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
|
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
|
||||||
promise.resume(bobAuthParams)
|
promise.resume(bobAuthParams)
|
||||||
}
|
}
|
||||||
}, it) }
|
}, it)
|
||||||
|
}
|
||||||
|
|
||||||
// Check that alice can see bob keys
|
// Check that alice can see bob keys
|
||||||
testHelper.doSync<MXUsersDevicesMap<CryptoDeviceInfo>> { aliceSession.cryptoService().downloadKeys(listOf(bobSession.myUserId), true, it) }
|
testHelper.doSync<MXUsersDevicesMap<CryptoDeviceInfo>> { aliceSession.cryptoService().downloadKeys(listOf(bobSession.myUserId), true, it) }
|
||||||
@ -149,16 +151,20 @@ class XSigningTest : InstrumentedTest {
|
|||||||
password = TestConstants.PASSWORD
|
password = TestConstants.PASSWORD
|
||||||
)
|
)
|
||||||
|
|
||||||
testHelper.doSync<Unit> { aliceSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor {
|
testHelper.doSync<Unit> {
|
||||||
|
aliceSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor {
|
||||||
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
|
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
|
||||||
promise.resume(aliceAuthParams)
|
promise.resume(aliceAuthParams)
|
||||||
}
|
}
|
||||||
}, it) }
|
}, it)
|
||||||
testHelper.doSync<Unit> { bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor {
|
}
|
||||||
|
testHelper.doSync<Unit> {
|
||||||
|
bobSession.cryptoService().crossSigningService().initializeCrossSigning(object : UserInteractiveAuthInterceptor {
|
||||||
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
|
override fun performStage(flowResponse: RegistrationFlowResponse, errCode: String?, promise: Continuation<UIABaseAuth>) {
|
||||||
promise.resume(bobAuthParams)
|
promise.resume(bobAuthParams)
|
||||||
}
|
}
|
||||||
}, it) }
|
}, it)
|
||||||
|
}
|
||||||
|
|
||||||
// Check that alice can see bob keys
|
// Check that alice can see bob keys
|
||||||
val bobUserId = bobSession.myUserId
|
val bobUserId = bobSession.myUserId
|
||||||
|
@ -43,6 +43,7 @@ interface SyncStatusService {
|
|||||||
val rooms: Int,
|
val rooms: Int,
|
||||||
val toDevice: Int
|
val toDevice: Int
|
||||||
) : IncrementalSyncStatus()
|
) : IncrementalSyncStatus()
|
||||||
|
|
||||||
object IncrementalSyncError : IncrementalSyncStatus()
|
object IncrementalSyncError : IncrementalSyncStatus()
|
||||||
object IncrementalSyncDone : IncrementalSyncStatus()
|
object IncrementalSyncDone : IncrementalSyncStatus()
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,7 @@ data class CallNegotiateContent(
|
|||||||
*/
|
*/
|
||||||
@Json(name = "version") override val version: String?
|
@Json(name = "version") override val version: String?
|
||||||
|
|
||||||
) : CallSignalingContent {
|
) : CallSignalingContent {
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
data class Description(
|
data class Description(
|
||||||
/**
|
/**
|
||||||
|
@ -24,7 +24,7 @@ import org.matrix.android.sdk.internal.crypto.verification.VerificationInfoReque
|
|||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
data class MessageVerificationRequestContent(
|
data class MessageVerificationRequestContent(
|
||||||
@Json(name = MessageContent.MSG_TYPE_JSON_KEY)override val msgType: String = MessageType.MSGTYPE_VERIFICATION_REQUEST,
|
@Json(name = MessageContent.MSG_TYPE_JSON_KEY) override val msgType: String = MessageType.MSGTYPE_VERIFICATION_REQUEST,
|
||||||
@Json(name = "body") override val body: String,
|
@Json(name = "body") override val body: String,
|
||||||
@Json(name = "from_device") override val fromDevice: String?,
|
@Json(name = "from_device") override val fromDevice: String?,
|
||||||
@Json(name = "methods") override val methods: List<String>,
|
@Json(name = "methods") override val methods: List<String>,
|
||||||
|
@ -27,7 +27,7 @@ data class MessageVideoContent(
|
|||||||
/**
|
/**
|
||||||
* Required. Must be 'm.video'.
|
* Required. Must be 'm.video'.
|
||||||
*/
|
*/
|
||||||
@Json(name = MessageContent.MSG_TYPE_JSON_KEY)override val msgType: String,
|
@Json(name = MessageContent.MSG_TYPE_JSON_KEY) override val msgType: String,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Required. A description of the video e.g. 'Gangnam style', or some kind of content description for accessibility e.g. 'video attachment'.
|
* Required. A description of the video e.g. 'Gangnam style', or some kind of content description for accessibility e.g. 'video attachment'.
|
||||||
|
@ -31,7 +31,7 @@ internal open class CryptoRoomEntity(
|
|||||||
// a security to ensure that a room will never revert to not encrypted
|
// a security to ensure that a room will never revert to not encrypted
|
||||||
// even if a new state event with empty encryption, or state is reset somehow
|
// even if a new state event with empty encryption, or state is reset somehow
|
||||||
var wasEncryptedOnce: Boolean? = false
|
var wasEncryptedOnce: Boolean? = false
|
||||||
) :
|
) :
|
||||||
RealmObject() {
|
RealmObject() {
|
||||||
|
|
||||||
companion object
|
companion object
|
||||||
|
@ -24,7 +24,8 @@ import io.realm.annotations.LinkingObjects
|
|||||||
import org.matrix.android.sdk.internal.extensions.assertIsManaged
|
import org.matrix.android.sdk.internal.extensions.assertIsManaged
|
||||||
import org.matrix.android.sdk.internal.extensions.clearWith
|
import org.matrix.android.sdk.internal.extensions.clearWith
|
||||||
|
|
||||||
internal open class ChunkEntity(@Index var prevToken: String? = null,
|
internal open class ChunkEntity(
|
||||||
|
@Index var prevToken: String? = null,
|
||||||
// Because of gaps we can have several chunks with nextToken == null
|
// Because of gaps we can have several chunks with nextToken == null
|
||||||
@Index var nextToken: String? = null,
|
@Index var nextToken: String? = null,
|
||||||
var prevChunk: ChunkEntity? = null,
|
var prevChunk: ChunkEntity? = null,
|
||||||
|
@ -48,8 +48,10 @@ internal open class RoomEntity(@PrimaryKey var roomId: String = "",
|
|||||||
set(value) {
|
set(value) {
|
||||||
membersLoadStatusStr = value.name
|
membersLoadStatusStr = value.name
|
||||||
}
|
}
|
||||||
|
|
||||||
companion object
|
companion object
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun RoomEntity.removeThreadSummaryIfNeeded(eventId: String) {
|
internal fun RoomEntity.removeThreadSummaryIfNeeded(eventId: String) {
|
||||||
assertIsManaged()
|
assertIsManaged()
|
||||||
threadSummaries.findRootOrLatest(eventId)?.let {
|
threadSummaries.findRootOrLatest(eventId)?.let {
|
||||||
|
@ -56,18 +56,21 @@ internal fun ChunkEntity.Companion.findLastForwardChunkOfRoom(realm: Realm, room
|
|||||||
.equalTo(ChunkEntityFields.IS_LAST_FORWARD, true)
|
.equalTo(ChunkEntityFields.IS_LAST_FORWARD, true)
|
||||||
.findFirst()
|
.findFirst()
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun ChunkEntity.Companion.findLastForwardChunkOfThread(realm: Realm, roomId: String, rootThreadEventId: String): ChunkEntity? {
|
internal fun ChunkEntity.Companion.findLastForwardChunkOfThread(realm: Realm, roomId: String, rootThreadEventId: String): ChunkEntity? {
|
||||||
return where(realm, roomId)
|
return where(realm, roomId)
|
||||||
.equalTo(ChunkEntityFields.ROOT_THREAD_EVENT_ID, rootThreadEventId)
|
.equalTo(ChunkEntityFields.ROOT_THREAD_EVENT_ID, rootThreadEventId)
|
||||||
.equalTo(ChunkEntityFields.IS_LAST_FORWARD_THREAD, true)
|
.equalTo(ChunkEntityFields.IS_LAST_FORWARD_THREAD, true)
|
||||||
.findFirst()
|
.findFirst()
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun ChunkEntity.Companion.findEventInThreadChunk(realm: Realm, roomId: String, event: String): ChunkEntity? {
|
internal fun ChunkEntity.Companion.findEventInThreadChunk(realm: Realm, roomId: String, event: String): ChunkEntity? {
|
||||||
return where(realm, roomId)
|
return where(realm, roomId)
|
||||||
.`in`(ChunkEntityFields.TIMELINE_EVENTS.EVENT_ID, arrayListOf(event).toTypedArray())
|
.`in`(ChunkEntityFields.TIMELINE_EVENTS.EVENT_ID, arrayListOf(event).toTypedArray())
|
||||||
.equalTo(ChunkEntityFields.IS_LAST_FORWARD_THREAD, true)
|
.equalTo(ChunkEntityFields.IS_LAST_FORWARD_THREAD, true)
|
||||||
.findFirst()
|
.findFirst()
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun ChunkEntity.Companion.findAllIncludingEvents(realm: Realm, eventIds: List<String>): RealmResults<ChunkEntity> {
|
internal fun ChunkEntity.Companion.findAllIncludingEvents(realm: Realm, eventIds: List<String>): RealmResults<ChunkEntity> {
|
||||||
return realm.where<ChunkEntity>()
|
return realm.where<ChunkEntity>()
|
||||||
.`in`(ChunkEntityFields.TIMELINE_EVENTS.EVENT_ID, eventIds.toTypedArray())
|
.`in`(ChunkEntityFields.TIMELINE_EVENTS.EVENT_ID, eventIds.toTypedArray())
|
||||||
|
@ -39,9 +39,11 @@ internal fun ThreadSummaryEntity.Companion.getOrCreate(realm: Realm, roomId: Str
|
|||||||
this.rootThreadEventId = rootThreadEventId
|
this.rootThreadEventId = rootThreadEventId
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun ThreadSummaryEntity.Companion.getOrNull(realm: Realm, roomId: String, rootThreadEventId: String): ThreadSummaryEntity? {
|
internal fun ThreadSummaryEntity.Companion.getOrNull(realm: Realm, roomId: String, rootThreadEventId: String): ThreadSummaryEntity? {
|
||||||
return where(realm, roomId, rootThreadEventId).findFirst()
|
return where(realm, roomId, rootThreadEventId).findFirst()
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun RealmList<ThreadSummaryEntity>.find(rootThreadEventId: String): ThreadSummaryEntity? {
|
internal fun RealmList<ThreadSummaryEntity>.find(rootThreadEventId: String): ThreadSummaryEntity? {
|
||||||
return this.where()
|
return this.where()
|
||||||
.equalTo(ThreadSummaryEntityFields.ROOT_THREAD_EVENT_ID, rootThreadEventId)
|
.equalTo(ThreadSummaryEntityFields.ROOT_THREAD_EVENT_ID, rootThreadEventId)
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
package org.matrix.android.sdk.internal.network
|
package org.matrix.android.sdk.internal.network
|
||||||
|
|
||||||
import org.matrix.android.sdk.internal.network.executeRequest as internalExecuteRequest
|
import org.matrix.android.sdk.internal.network.executeRequest as internalExecuteRequest
|
||||||
|
|
||||||
internal interface RequestExecutor {
|
internal interface RequestExecutor {
|
||||||
|
@ -49,7 +49,8 @@ import java.util.concurrent.atomic.AtomicBoolean
|
|||||||
* It does mainly listen to the db timeline events.
|
* It does mainly listen to the db timeline events.
|
||||||
* It also triggers pagination to the server when needed, or dispatch to the prev or next chunk if any.
|
* It also triggers pagination to the server when needed, or dispatch to the prev or next chunk if any.
|
||||||
*/
|
*/
|
||||||
internal class TimelineChunk(private val chunkEntity: ChunkEntity,
|
internal class TimelineChunk(
|
||||||
|
private val chunkEntity: ChunkEntity,
|
||||||
private val timelineSettings: TimelineSettings,
|
private val timelineSettings: TimelineSettings,
|
||||||
private val roomId: String,
|
private val roomId: String,
|
||||||
private val timelineId: String,
|
private val timelineId: String,
|
||||||
|
@ -39,6 +39,7 @@ internal enum class SyncPresence(val value: String) {
|
|||||||
PresenceEnum.UNAVAILABLE -> Unavailable
|
PresenceEnum.UNAVAILABLE -> Unavailable
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun from(s: String?): SyncPresence? = values().find { it.value == s }
|
fun from(s: String?): SyncPresence? = values().find { it.value == s }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -52,7 +52,7 @@ internal class DefaultWidgetService @Inject constructor(private val widgetManage
|
|||||||
return widgetManager.getWidgetComputedUrl(widget, isLightTheme)
|
return widgetManager.getWidgetComputedUrl(widget, isLightTheme)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getRoomWidgetsLive(
|
override fun getRoomWidgetsLive(
|
||||||
roomId: String,
|
roomId: String,
|
||||||
widgetId: QueryStringValue,
|
widgetId: QueryStringValue,
|
||||||
widgetTypes: Set<String>?,
|
widgetTypes: Set<String>?,
|
||||||
|
@ -75,6 +75,7 @@ class MessageMenuRobot(
|
|||||||
clickOn(R.string.reply_in_thread)
|
clickOn(R.string.reply_in_thread)
|
||||||
autoClosed = true
|
autoClosed = true
|
||||||
}
|
}
|
||||||
|
|
||||||
fun viewInRoom() {
|
fun viewInRoom() {
|
||||||
clickOn(R.string.view_in_room)
|
clickOn(R.string.view_in_room)
|
||||||
autoClosed = true
|
autoClosed = true
|
||||||
|
@ -32,6 +32,7 @@ abstract class SasEmojiItem : VectorEpoxyModel<SasEmojiItem.Holder>() {
|
|||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
var index: Int = 0
|
var index: Int = 0
|
||||||
|
|
||||||
@EpoxyAttribute
|
@EpoxyAttribute
|
||||||
lateinit var emojiRepresentation: EmojiRepresentation
|
lateinit var emojiRepresentation: EmojiRepresentation
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ data class E2EMessageDetected(
|
|||||||
val senderDeviceId: String,
|
val senderDeviceId: String,
|
||||||
val senderKey: String,
|
val senderKey: String,
|
||||||
val sessionId: String
|
val sessionId: String
|
||||||
) {
|
) {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
fun fromEvent(event: Event, roomId: String): E2EMessageDetected {
|
fun fromEvent(event: Event, roomId: String): E2EMessageDetected {
|
||||||
@ -109,9 +109,9 @@ class UISIDetector : LiveEventListener {
|
|||||||
timer.schedule(timeoutTask, timeoutMillis)
|
timer.schedule(timeoutTask, timeoutMillis)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onLiveEvent(roomId: String, event: Event) { }
|
override fun onLiveEvent(roomId: String, event: Event) {}
|
||||||
|
|
||||||
override fun onPaginatedEvent(roomId: String, event: Event) { }
|
override fun onPaginatedEvent(roomId: String, event: Event) {}
|
||||||
|
|
||||||
private fun trackerId(eventId: String, roomId: String): String = "$roomId-$eventId"
|
private fun trackerId(eventId: String, roomId: String): String = "$roomId-$eventId"
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ sealed class VectorCallViewEvents : VectorViewEvents {
|
|||||||
val available: Set<CallAudioManager.Device>,
|
val available: Set<CallAudioManager.Device>,
|
||||||
val current: CallAudioManager.Device
|
val current: CallAudioManager.Device
|
||||||
) : VectorCallViewEvents()
|
) : VectorCallViewEvents()
|
||||||
|
|
||||||
object ShowDialPad : VectorCallViewEvents()
|
object ShowDialPad : VectorCallViewEvents()
|
||||||
object ShowCallTransferScreen : VectorCallViewEvents()
|
object ShowCallTransferScreen : VectorCallViewEvents()
|
||||||
object FailToTransfer : VectorCallViewEvents()
|
object FailToTransfer : VectorCallViewEvents()
|
||||||
|
@ -62,5 +62,5 @@ class CallTransferViewModel @AssistedInject constructor(@Assisted initialState:
|
|||||||
call?.removeListener(callListener)
|
call?.removeListener(callListener)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun handle(action: EmptyAction) { }
|
override fun handle(action: EmptyAction) {}
|
||||||
}
|
}
|
||||||
|
@ -37,7 +37,7 @@ sealed class BootstrapActions : VectorViewModelAction {
|
|||||||
data class UpdateCandidatePassphrase(val pass: String) : BootstrapActions()
|
data class UpdateCandidatePassphrase(val pass: String) : BootstrapActions()
|
||||||
data class UpdateConfirmCandidatePassphrase(val pass: String) : BootstrapActions()
|
data class UpdateConfirmCandidatePassphrase(val pass: String) : BootstrapActions()
|
||||||
|
|
||||||
// data class ReAuth(val pass: String) : BootstrapActions()
|
// data class ReAuth(val pass: String) : BootstrapActions()
|
||||||
object RecoveryKeySaved : BootstrapActions()
|
object RecoveryKeySaved : BootstrapActions()
|
||||||
object Completed : BootstrapActions()
|
object Completed : BootstrapActions()
|
||||||
object SaveReqQueryStarted : BootstrapActions()
|
object SaveReqQueryStarted : BootstrapActions()
|
||||||
|
@ -132,6 +132,7 @@ class TimelineEventController @Inject constructor(private val dateFormatter: Vec
|
|||||||
mediaData: ImageContentRenderer.Data,
|
mediaData: ImageContentRenderer.Data,
|
||||||
view: View,
|
view: View,
|
||||||
inMemory: List<AttachmentData>)
|
inMemory: List<AttachmentData>)
|
||||||
|
|
||||||
fun onVideoMessageClicked(messageVideoContent: MessageVideoContent, mediaData: VideoContentRenderer.Data, view: View)
|
fun onVideoMessageClicked(messageVideoContent: MessageVideoContent, mediaData: VideoContentRenderer.Data, view: View)
|
||||||
|
|
||||||
// fun onFileMessageClicked(eventId: String, messageFileContent: MessageFileContent)
|
// fun onFileMessageClicked(eventId: String, messageFileContent: MessageFileContent)
|
||||||
|
@ -127,9 +127,11 @@ abstract class MessageAudioItem : AbsMessageItem<MessageAudioItem.Holder>() {
|
|||||||
(duration * (progress.toFloat() / 100)).toInt()
|
(duration * (progress.toFloat() / 100)).toInt()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStartTrackingTouch(seekBar: SeekBar) {
|
override fun onStartTrackingTouch(seekBar: SeekBar) {
|
||||||
isUserSeeking = true
|
isUserSeeking = true
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onStopTrackingTouch(seekBar: SeekBar) {
|
override fun onStopTrackingTouch(seekBar: SeekBar) {
|
||||||
isUserSeeking = false
|
isUserSeeking = false
|
||||||
val percentage = seekBar.progress.toFloat() / 100
|
val percentage = seekBar.progress.toFloat() / 100
|
||||||
|
@ -122,6 +122,7 @@ class ThreadListFragment @Inject constructor(
|
|||||||
bugReporter.openBugReportScreen(requireActivity(), reportType = ReportType.THREADS_BETA_FEEDBACK)
|
bugReporter.openBugReportScreen(requireActivity(), reportType = ReportType.THREADS_BETA_FEEDBACK)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun invalidate() = withState(threadListViewModel) { state ->
|
override fun invalidate() = withState(threadListViewModel) { state ->
|
||||||
invalidateOptionsMenu()
|
invalidateOptionsMenu()
|
||||||
renderEmptyStateIfNeeded(state)
|
renderEmptyStateIfNeeded(state)
|
||||||
|
@ -21,7 +21,8 @@ import kotlinx.parcelize.Parcelize
|
|||||||
import org.matrix.android.sdk.api.auth.data.SsoIdentityProvider
|
import org.matrix.android.sdk.api.auth.data.SsoIdentityProvider
|
||||||
|
|
||||||
sealed class LoginMode : Parcelable
|
sealed class LoginMode : Parcelable
|
||||||
/** because persist state */ {
|
/** because persist state */
|
||||||
|
{
|
||||||
@Parcelize object Unknown : LoginMode()
|
@Parcelize object Unknown : LoginMode()
|
||||||
@Parcelize object Password : LoginMode()
|
@Parcelize object Password : LoginMode()
|
||||||
@Parcelize data class Sso(val ssoIdentityProviders: List<SsoIdentityProvider>?) : LoginMode()
|
@Parcelize data class Sso(val ssoIdentityProviders: List<SsoIdentityProvider>?) : LoginMode()
|
||||||
|
@ -23,9 +23,9 @@ import kotlin.reflect.KProperty
|
|||||||
* This is a simple hack for having some Session scope dependencies.
|
* This is a simple hack for having some Session scope dependencies.
|
||||||
* Probably a temporary solution waiting for refactoring the Dagger management of Session.
|
* Probably a temporary solution waiting for refactoring the Dagger management of Session.
|
||||||
* You should use it with an extension property :
|
* You should use it with an extension property :
|
||||||
val Session.myProperty: MyProperty by SessionScopedProperty {
|
val Session.myProperty: MyProperty by SessionScopedProperty {
|
||||||
init code
|
init code
|
||||||
}
|
}
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class SessionScopedProperty<T : Any>(val initializer: (Session) -> T) {
|
class SessionScopedProperty<T : Any>(val initializer: (Session) -> T) {
|
||||||
|
@ -23,7 +23,7 @@ sealed class DevicesAction : VectorViewModelAction {
|
|||||||
object Refresh : DevicesAction()
|
object Refresh : DevicesAction()
|
||||||
data class Delete(val deviceId: String) : DevicesAction()
|
data class Delete(val deviceId: String) : DevicesAction()
|
||||||
|
|
||||||
// data class Password(val password: String) : DevicesAction()
|
// data class Password(val password: String) : DevicesAction()
|
||||||
data class Rename(val deviceId: String, val newName: String) : DevicesAction()
|
data class Rename(val deviceId: String, val newName: String) : DevicesAction()
|
||||||
|
|
||||||
data class PromptRename(val deviceId: String) : DevicesAction()
|
data class PromptRename(val deviceId: String) : DevicesAction()
|
||||||
|
@ -29,7 +29,7 @@ import org.matrix.android.sdk.api.session.crypto.model.DeviceInfo
|
|||||||
sealed class DevicesViewEvents : VectorViewEvents {
|
sealed class DevicesViewEvents : VectorViewEvents {
|
||||||
data class Loading(val message: CharSequence? = null) : DevicesViewEvents()
|
data class Loading(val message: CharSequence? = null) : DevicesViewEvents()
|
||||||
|
|
||||||
// object HideLoading : DevicesViewEvents()
|
// object HideLoading : DevicesViewEvents()
|
||||||
data class Failure(val throwable: Throwable) : DevicesViewEvents()
|
data class Failure(val throwable: Throwable) : DevicesViewEvents()
|
||||||
|
|
||||||
// object RequestPassword : DevicesViewEvents()
|
// object RequestPassword : DevicesViewEvents()
|
||||||
|
@ -28,6 +28,7 @@ import im.vector.app.core.extensions.configureWith
|
|||||||
import im.vector.app.core.platform.VectorBaseFragment
|
import im.vector.app.core.platform.VectorBaseFragment
|
||||||
import im.vector.app.databinding.FragmentGenericRecyclerBinding
|
import im.vector.app.databinding.FragmentGenericRecyclerBinding
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class OutgoingKeyRequestListFragment @Inject constructor(
|
class OutgoingKeyRequestListFragment @Inject constructor(
|
||||||
private val epoxyController: OutgoingKeyRequestPagedController
|
private val epoxyController: OutgoingKeyRequestPagedController
|
||||||
) : VectorBaseFragment<FragmentGenericRecyclerBinding>() {
|
) : VectorBaseFragment<FragmentGenericRecyclerBinding>() {
|
||||||
|
@ -29,7 +29,8 @@ enum class NotificationIndex {
|
|||||||
* Given a push rule determine the NotificationIndex by comparing it to the static push rule definitions.
|
* Given a push rule determine the NotificationIndex by comparing it to the static push rule definitions.
|
||||||
* Used when determining the selected state of the PushRulePreference.
|
* Used when determining the selected state of the PushRulePreference.
|
||||||
*/
|
*/
|
||||||
val PushRule.notificationIndex: NotificationIndex? get() =
|
val PushRule.notificationIndex: NotificationIndex?
|
||||||
|
get() =
|
||||||
NotificationIndex.values().firstOrNull {
|
NotificationIndex.values().firstOrNull {
|
||||||
// Get the actions for the index
|
// Get the actions for the index
|
||||||
val standardAction = getStandardAction(this.ruleId, it) ?: return@firstOrNull false
|
val standardAction = getStandardAction(this.ruleId, it) ?: return@firstOrNull false
|
||||||
|
@ -75,6 +75,7 @@ class ThreePidsSettingsFragment @Inject constructor(
|
|||||||
reAuthActivityResultLauncher.launch(intent)
|
reAuthActivityResultLauncher.launch(intent)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private val reAuthActivityResultLauncher = registerStartForActivityResult { activityResult ->
|
private val reAuthActivityResultLauncher = registerStartForActivityResult { activityResult ->
|
||||||
if (activityResult.resultCode == Activity.RESULT_OK) {
|
if (activityResult.resultCode == Activity.RESULT_OK) {
|
||||||
when (activityResult.data?.extras?.getString(ReAuthActivity.RESULT_FLOW_TYPE)) {
|
when (activityResult.data?.extras?.getString(ReAuthActivity.RESULT_FLOW_TYPE)) {
|
||||||
|
@ -22,6 +22,6 @@ import org.matrix.android.sdk.api.auth.registration.RegistrationFlowResponse
|
|||||||
sealed class ThreePidsSettingsViewEvents : VectorViewEvents {
|
sealed class ThreePidsSettingsViewEvents : VectorViewEvents {
|
||||||
data class Failure(val throwable: Throwable) : ThreePidsSettingsViewEvents()
|
data class Failure(val throwable: Throwable) : ThreePidsSettingsViewEvents()
|
||||||
|
|
||||||
// object RequestPassword : ThreePidsSettingsViewEvents()
|
// object RequestPassword : ThreePidsSettingsViewEvents()
|
||||||
data class RequestReAuth(val registrationFlowResponse: RegistrationFlowResponse, val lastErrorCode: String?) : ThreePidsSettingsViewEvents()
|
data class RequestReAuth(val registrationFlowResponse: RegistrationFlowResponse, val lastErrorCode: String?) : ThreePidsSettingsViewEvents()
|
||||||
}
|
}
|
||||||
|
@ -33,9 +33,15 @@ data class CreateSpaceState(
|
|||||||
val aliasManuallyModified: Boolean = false,
|
val aliasManuallyModified: Boolean = false,
|
||||||
val aliasVerificationTask: Async<Boolean> = Uninitialized,
|
val aliasVerificationTask: Async<Boolean> = Uninitialized,
|
||||||
val nameInlineError: String? = null,
|
val nameInlineError: String? = null,
|
||||||
val defaultRooms: Map<Int /** position in form */, String?>? = null,
|
val defaultRooms: Map<Int
|
||||||
val default3pidInvite: Map<Int /** position in form */, String?>? = null,
|
/** position in form */
|
||||||
val emailValidationResult: Map<Int /** position in form */, Boolean>? = null,
|
, String?>? = null,
|
||||||
|
val default3pidInvite: Map<Int
|
||||||
|
/** position in form */
|
||||||
|
, String?>? = null,
|
||||||
|
val emailValidationResult: Map<Int
|
||||||
|
/** position in form */
|
||||||
|
, Boolean>? = null,
|
||||||
val creationResult: Async<String> = Uninitialized,
|
val creationResult: Async<String> = Uninitialized,
|
||||||
val canInviteByMail: Boolean = false
|
val canInviteByMail: Boolean = false
|
||||||
) : MavericksState {
|
) : MavericksState {
|
||||||
|
@ -19,6 +19,6 @@ package im.vector.app.features.spaces.manage
|
|||||||
import im.vector.app.core.platform.VectorViewEvents
|
import im.vector.app.core.platform.VectorViewEvents
|
||||||
|
|
||||||
sealed class SpaceManageRoomViewEvents : VectorViewEvents {
|
sealed class SpaceManageRoomViewEvents : VectorViewEvents {
|
||||||
// object BulkActionSuccess: SpaceManageRoomViewEvents()
|
// object BulkActionSuccess: SpaceManageRoomViewEvents()
|
||||||
data class BulkActionFailure(val errorList: List<Throwable>) : SpaceManageRoomViewEvents()
|
data class BulkActionFailure(val errorList: List<Throwable>) : SpaceManageRoomViewEvents()
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@ enum class ManageType {
|
|||||||
Settings,
|
Settings,
|
||||||
ManageRooms
|
ManageRooms
|
||||||
}
|
}
|
||||||
|
|
||||||
data class SpaceManageViewState(
|
data class SpaceManageViewState(
|
||||||
val spaceId: String = "",
|
val spaceId: String = "",
|
||||||
val manageType: ManageType
|
val manageType: ManageType
|
||||||
|
Loading…
x
Reference in New Issue
Block a user