Big annoying commit: execute command ./gradlew ktlintFormat
- Fix "colon-spacing"
This commit is contained in:
parent
a1caccbcc8
commit
d1e9f3131a
@ -290,8 +290,8 @@ abstract class AttachmentViewerActivity : AppCompatActivity(), AttachmentEventLi
|
|||||||
private fun calculateTranslationAlpha(translationY: Float, translationLimit: Int): Float =
|
private fun calculateTranslationAlpha(translationY: Float, translationLimit: Int): Float =
|
||||||
1.0f - 1.0f / translationLimit.toFloat() / 4f * abs(translationY)
|
1.0f - 1.0f / translationLimit.toFloat() / 4f * abs(translationY)
|
||||||
|
|
||||||
private fun createSwipeToDismissHandler()
|
private fun createSwipeToDismissHandler(): SwipeToDismissHandler =
|
||||||
: SwipeToDismissHandler = SwipeToDismissHandler(
|
SwipeToDismissHandler(
|
||||||
swipeView = views.dismissContainer,
|
swipeView = views.dismissContainer,
|
||||||
shouldAnimateDismiss = { shouldAnimateDismiss() },
|
shouldAnimateDismiss = { shouldAnimateDismiss() },
|
||||||
onDismiss = { animateClose() },
|
onDismiss = { animateClose() },
|
||||||
|
@ -36,8 +36,8 @@ interface ImageLoaderTarget {
|
|||||||
fun onResourceReady(uid: String, resource: Drawable)
|
fun onResourceReady(uid: String, resource: Drawable)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class DefaultImageLoaderTarget(val holder: AnimatedImageViewHolder, private val contextView: ImageView)
|
internal class DefaultImageLoaderTarget(val holder: AnimatedImageViewHolder, private val contextView: ImageView) :
|
||||||
: ImageLoaderTarget {
|
ImageLoaderTarget {
|
||||||
override fun contextView(): ImageView {
|
override fun contextView(): ImageView {
|
||||||
return contextView
|
return contextView
|
||||||
}
|
}
|
||||||
|
@ -34,8 +34,8 @@ private class LiveDataObservable<T>(
|
|||||||
liveData.observeForever(relay)
|
liveData.observeForever(relay)
|
||||||
}
|
}
|
||||||
|
|
||||||
private inner class RemoveObserverInMainThread(private val observer: io.reactivex.Observer<in T>)
|
private inner class RemoveObserverInMainThread(private val observer: io.reactivex.Observer<in T>) :
|
||||||
: MainThreadDisposable(), Observer<T> {
|
MainThreadDisposable(), Observer<T> {
|
||||||
|
|
||||||
override fun onChanged(t: T?) {
|
override fun onChanged(t: T?) {
|
||||||
if (!isDisposed) {
|
if (!isDisposed) {
|
||||||
|
@ -36,8 +36,8 @@ import javax.inject.Inject
|
|||||||
* non-production environment.
|
* non-production environment.
|
||||||
*/
|
*/
|
||||||
@MatrixScope
|
@MatrixScope
|
||||||
internal class CurlLoggingInterceptor @Inject constructor()
|
internal class CurlLoggingInterceptor @Inject constructor() :
|
||||||
: Interceptor {
|
Interceptor {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set any additional curl command options (see 'curl --help').
|
* Set any additional curl command options (see 'curl --help').
|
||||||
|
@ -22,8 +22,8 @@ sealed class SharedSecretStorageError(message: String?) : Throwable(message) {
|
|||||||
data class UnknownAlgorithm(val keyId: String) : SharedSecretStorageError("Unknown algorithm $keyId")
|
data class UnknownAlgorithm(val keyId: String) : SharedSecretStorageError("Unknown algorithm $keyId")
|
||||||
data class UnsupportedAlgorithm(val algorithm: String) : SharedSecretStorageError("Unknown algorithm $algorithm")
|
data class UnsupportedAlgorithm(val algorithm: String) : SharedSecretStorageError("Unknown algorithm $algorithm")
|
||||||
data class SecretNotEncrypted(val secretName: String) : SharedSecretStorageError("Missing content for secret $secretName")
|
data class SecretNotEncrypted(val secretName: String) : SharedSecretStorageError("Missing content for secret $secretName")
|
||||||
data class SecretNotEncryptedWithKey(val secretName: String, val keyId: String)
|
data class SecretNotEncryptedWithKey(val secretName: String, val keyId: String) :
|
||||||
: SharedSecretStorageError("Missing content for secret $secretName with key $keyId")
|
SharedSecretStorageError("Missing content for secret $secretName with key $keyId")
|
||||||
|
|
||||||
object BadKeyFormat : SharedSecretStorageError("Bad Key Format")
|
object BadKeyFormat : SharedSecretStorageError("Bad Key Format")
|
||||||
object ParsingError : SharedSecretStorageError("parsing Error")
|
object ParsingError : SharedSecretStorageError("parsing Error")
|
||||||
|
@ -34,8 +34,8 @@ sealed class MatrixItem(
|
|||||||
) {
|
) {
|
||||||
data class UserItem(override val id: String,
|
data class UserItem(override val id: String,
|
||||||
override val displayName: String? = null,
|
override val displayName: String? = null,
|
||||||
override val avatarUrl: String? = null)
|
override val avatarUrl: String? = null) :
|
||||||
: MatrixItem(id, displayName?.removeSuffix(ircPattern), avatarUrl) {
|
MatrixItem(id, displayName?.removeSuffix(ircPattern), avatarUrl) {
|
||||||
init {
|
init {
|
||||||
if (BuildConfig.DEBUG) checkId()
|
if (BuildConfig.DEBUG) checkId()
|
||||||
}
|
}
|
||||||
@ -45,8 +45,8 @@ sealed class MatrixItem(
|
|||||||
|
|
||||||
data class EventItem(override val id: String,
|
data class EventItem(override val id: String,
|
||||||
override val displayName: String? = null,
|
override val displayName: String? = null,
|
||||||
override val avatarUrl: String? = null)
|
override val avatarUrl: String? = null) :
|
||||||
: MatrixItem(id, displayName, avatarUrl) {
|
MatrixItem(id, displayName, avatarUrl) {
|
||||||
init {
|
init {
|
||||||
if (BuildConfig.DEBUG) checkId()
|
if (BuildConfig.DEBUG) checkId()
|
||||||
}
|
}
|
||||||
@ -56,8 +56,8 @@ sealed class MatrixItem(
|
|||||||
|
|
||||||
data class RoomItem(override val id: String,
|
data class RoomItem(override val id: String,
|
||||||
override val displayName: String? = null,
|
override val displayName: String? = null,
|
||||||
override val avatarUrl: String? = null)
|
override val avatarUrl: String? = null) :
|
||||||
: MatrixItem(id, displayName, avatarUrl) {
|
MatrixItem(id, displayName, avatarUrl) {
|
||||||
init {
|
init {
|
||||||
if (BuildConfig.DEBUG) checkId()
|
if (BuildConfig.DEBUG) checkId()
|
||||||
}
|
}
|
||||||
@ -67,8 +67,8 @@ sealed class MatrixItem(
|
|||||||
|
|
||||||
data class SpaceItem(override val id: String,
|
data class SpaceItem(override val id: String,
|
||||||
override val displayName: String? = null,
|
override val displayName: String? = null,
|
||||||
override val avatarUrl: String? = null)
|
override val avatarUrl: String? = null) :
|
||||||
: MatrixItem(id, displayName, avatarUrl) {
|
MatrixItem(id, displayName, avatarUrl) {
|
||||||
init {
|
init {
|
||||||
if (BuildConfig.DEBUG) checkId()
|
if (BuildConfig.DEBUG) checkId()
|
||||||
}
|
}
|
||||||
@ -78,8 +78,8 @@ sealed class MatrixItem(
|
|||||||
|
|
||||||
data class RoomAliasItem(override val id: String,
|
data class RoomAliasItem(override val id: String,
|
||||||
override val displayName: String? = null,
|
override val displayName: String? = null,
|
||||||
override val avatarUrl: String? = null)
|
override val avatarUrl: String? = null) :
|
||||||
: MatrixItem(id, displayName, avatarUrl) {
|
MatrixItem(id, displayName, avatarUrl) {
|
||||||
init {
|
init {
|
||||||
if (BuildConfig.DEBUG) checkId()
|
if (BuildConfig.DEBUG) checkId()
|
||||||
}
|
}
|
||||||
@ -92,8 +92,8 @@ sealed class MatrixItem(
|
|||||||
|
|
||||||
data class GroupItem(override val id: String,
|
data class GroupItem(override val id: String,
|
||||||
override val displayName: String? = null,
|
override val displayName: String? = null,
|
||||||
override val avatarUrl: String? = null)
|
override val avatarUrl: String? = null) :
|
||||||
: MatrixItem(id, displayName, avatarUrl) {
|
MatrixItem(id, displayName, avatarUrl) {
|
||||||
init {
|
init {
|
||||||
if (BuildConfig.DEBUG) checkId()
|
if (BuildConfig.DEBUG) checkId()
|
||||||
}
|
}
|
||||||
|
@ -35,8 +35,8 @@ import org.matrix.android.sdk.internal.worker.SessionWorkerParams
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal class CancelGossipRequestWorker(context: Context,
|
internal class CancelGossipRequestWorker(context: Context,
|
||||||
params: WorkerParameters)
|
params: WorkerParameters) :
|
||||||
: SessionSafeCoroutineWorker<CancelGossipRequestWorker.Params>(context, params, Params::class.java) {
|
SessionSafeCoroutineWorker<CancelGossipRequestWorker.Params>(context, params, Params::class.java) {
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class Params(
|
internal data class Params(
|
||||||
|
@ -38,8 +38,8 @@ import timber.log.Timber
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal class SendGossipRequestWorker(context: Context,
|
internal class SendGossipRequestWorker(context: Context,
|
||||||
params: WorkerParameters)
|
params: WorkerParameters) :
|
||||||
: SessionSafeCoroutineWorker<SendGossipRequestWorker.Params>(context, params, Params::class.java) {
|
SessionSafeCoroutineWorker<SendGossipRequestWorker.Params>(context, params, Params::class.java) {
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class Params(
|
internal data class Params(
|
||||||
|
@ -38,8 +38,8 @@ import timber.log.Timber
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal class SendGossipWorker(context: Context,
|
internal class SendGossipWorker(context: Context,
|
||||||
params: WorkerParameters)
|
params: WorkerParameters) :
|
||||||
: SessionSafeCoroutineWorker<SendGossipWorker.Params>(context, params, Params::class.java) {
|
SessionSafeCoroutineWorker<SendGossipWorker.Params>(context, params, Params::class.java) {
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class Params(
|
internal data class Params(
|
||||||
|
@ -34,8 +34,8 @@ internal class MXOlmDecryption(
|
|||||||
// The olm device interface
|
// The olm device interface
|
||||||
private val olmDevice: MXOlmDevice,
|
private val olmDevice: MXOlmDevice,
|
||||||
// the matrix userId
|
// the matrix userId
|
||||||
private val userId: String)
|
private val userId: String) :
|
||||||
: IMXDecrypting {
|
IMXDecrypting {
|
||||||
|
|
||||||
@Throws(MXCryptoError::class)
|
@Throws(MXCryptoError::class)
|
||||||
override fun decryptEvent(event: Event, timeline: String): MXEventDecryptionResult {
|
override fun decryptEvent(event: Event, timeline: String): MXEventDecryptionResult {
|
||||||
|
@ -32,8 +32,8 @@ internal class MXOlmEncryption(
|
|||||||
private val cryptoStore: IMXCryptoStore,
|
private val cryptoStore: IMXCryptoStore,
|
||||||
private val messageEncrypter: MessageEncrypter,
|
private val messageEncrypter: MessageEncrypter,
|
||||||
private val deviceListManager: DeviceListManager,
|
private val deviceListManager: DeviceListManager,
|
||||||
private val ensureOlmSessionsForUsersAction: EnsureOlmSessionsForUsersAction)
|
private val ensureOlmSessionsForUsersAction: EnsureOlmSessionsForUsersAction) :
|
||||||
: IMXEncrypting {
|
IMXEncrypting {
|
||||||
|
|
||||||
override suspend fun encryptEventContent(eventContent: Content, eventType: String, userIds: List<String>): Content {
|
override suspend fun encryptEventContent(eventContent: Content, eventType: String, userIds: List<String>): Content {
|
||||||
// pick the list of recipients based on the membership list.
|
// pick the list of recipients based on the membership list.
|
||||||
|
@ -51,8 +51,8 @@ import timber.log.Timber
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal class UpdateTrustWorker(context: Context,
|
internal class UpdateTrustWorker(context: Context,
|
||||||
params: WorkerParameters)
|
params: WorkerParameters) :
|
||||||
: SessionSafeCoroutineWorker<UpdateTrustWorker.Params>(context, params, Params::class.java) {
|
SessionSafeCoroutineWorker<UpdateTrustWorker.Params>(context, params, Params::class.java) {
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class Params(
|
internal data class Params(
|
||||||
|
@ -28,8 +28,8 @@ internal open class CryptoRoomEntity(
|
|||||||
// to avoid re-create and re-share at each startup (if rotation not needed..)
|
// to avoid re-create and re-share at each startup (if rotation not needed..)
|
||||||
// This is specific to megolm but not sure how to model it better
|
// This is specific to megolm but not sure how to model it better
|
||||||
var outboundSessionInfo: OutboundGroupSessionInfoEntity? = null
|
var outboundSessionInfo: OutboundGroupSessionInfoEntity? = null
|
||||||
)
|
) :
|
||||||
: RealmObject() {
|
RealmObject() {
|
||||||
|
|
||||||
companion object
|
companion object
|
||||||
}
|
}
|
||||||
|
@ -33,8 +33,8 @@ internal open class OlmInboundGroupSessionEntity(
|
|||||||
// olmInboundGroupSessionData contains Json
|
// olmInboundGroupSessionData contains Json
|
||||||
var olmInboundGroupSessionData: String? = null,
|
var olmInboundGroupSessionData: String? = null,
|
||||||
// Indicate if the key has been backed up to the homeserver
|
// Indicate if the key has been backed up to the homeserver
|
||||||
var backedUp: Boolean = false)
|
var backedUp: Boolean = false) :
|
||||||
: RealmObject() {
|
RealmObject() {
|
||||||
|
|
||||||
fun getInboundGroupSession(): OlmInboundGroupSessionWrapper2? {
|
fun getInboundGroupSession(): OlmInboundGroupSessionWrapper2? {
|
||||||
return try {
|
return try {
|
||||||
|
@ -29,8 +29,8 @@ internal open class OlmSessionEntity(@PrimaryKey var primaryKey: String = "",
|
|||||||
var sessionId: String? = null,
|
var sessionId: String? = null,
|
||||||
var deviceKey: String? = null,
|
var deviceKey: String? = null,
|
||||||
var olmSessionData: String? = null,
|
var olmSessionData: String? = null,
|
||||||
var lastReceivedMessageTs: Long = 0)
|
var lastReceivedMessageTs: Long = 0) :
|
||||||
: RealmObject() {
|
RealmObject() {
|
||||||
|
|
||||||
fun getOlmSession(): OlmSession? {
|
fun getOlmSession(): OlmSession? {
|
||||||
return deserializeFromRealm(olmSessionData)
|
return deserializeFromRealm(olmSessionData)
|
||||||
|
@ -29,8 +29,7 @@ internal fun SharedSessionEntity.Companion.get(realm: Realm,
|
|||||||
sessionId: String,
|
sessionId: String,
|
||||||
userId: String,
|
userId: String,
|
||||||
deviceId: String,
|
deviceId: String,
|
||||||
deviceIdentityKey: String?)
|
deviceIdentityKey: String?): SharedSessionEntity? {
|
||||||
: SharedSessionEntity? {
|
|
||||||
return realm.where<SharedSessionEntity>()
|
return realm.where<SharedSessionEntity>()
|
||||||
.equalTo(SharedSessionEntityFields.ROOM_ID, roomId)
|
.equalTo(SharedSessionEntityFields.ROOM_ID, roomId)
|
||||||
.equalTo(SharedSessionEntityFields.SESSION_ID, sessionId)
|
.equalTo(SharedSessionEntityFields.SESSION_ID, sessionId)
|
||||||
@ -41,8 +40,7 @@ internal fun SharedSessionEntity.Companion.get(realm: Realm,
|
|||||||
.findFirst()
|
.findFirst()
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun SharedSessionEntity.Companion.get(realm: Realm, roomId: String?, sessionId: String)
|
internal fun SharedSessionEntity.Companion.get(realm: Realm, roomId: String?, sessionId: String): RealmResults<SharedSessionEntity> {
|
||||||
: RealmResults<SharedSessionEntity> {
|
|
||||||
return realm.where<SharedSessionEntity>()
|
return realm.where<SharedSessionEntity>()
|
||||||
.equalTo(SharedSessionEntityFields.ROOM_ID, roomId)
|
.equalTo(SharedSessionEntityFields.ROOM_ID, roomId)
|
||||||
.equalTo(SharedSessionEntityFields.SESSION_ID, sessionId)
|
.equalTo(SharedSessionEntityFields.SESSION_ID, sessionId)
|
||||||
@ -55,8 +53,7 @@ internal fun SharedSessionEntity.Companion.create(realm: Realm, roomId: String?,
|
|||||||
userId: String,
|
userId: String,
|
||||||
deviceId: String,
|
deviceId: String,
|
||||||
deviceIdentityKey: String,
|
deviceIdentityKey: String,
|
||||||
chainIndex: Int)
|
chainIndex: Int): SharedSessionEntity {
|
||||||
: SharedSessionEntity {
|
|
||||||
return realm.createObject<SharedSessionEntity>().apply {
|
return realm.createObject<SharedSessionEntity>().apply {
|
||||||
this.roomId = roomId
|
this.roomId = roomId
|
||||||
this.algorithm = MXCRYPTO_ALGORITHM_MEGOLM
|
this.algorithm = MXCRYPTO_ALGORITHM_MEGOLM
|
||||||
|
@ -1126,8 +1126,7 @@ internal class DefaultVerificationService @Inject constructor(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun requestKeyVerificationInDMs(methods: List<VerificationMethod>, otherUserId: String, roomId: String, localId: String?)
|
override fun requestKeyVerificationInDMs(methods: List<VerificationMethod>, otherUserId: String, roomId: String, localId: String?): PendingVerificationRequest {
|
||||||
: PendingVerificationRequest {
|
|
||||||
Timber.i("## SAS Requesting verification to user: $otherUserId in room $roomId")
|
Timber.i("## SAS Requesting verification to user: $otherUserId in room $roomId")
|
||||||
|
|
||||||
val requestsForUser = pendingRequests.getOrPut(otherUserId) { mutableListOf() }
|
val requestsForUser = pendingRequests.getOrPut(otherUserId) { mutableListOf() }
|
||||||
|
@ -34,8 +34,8 @@ import javax.inject.Inject
|
|||||||
* Possible next worker : None
|
* Possible next worker : None
|
||||||
*/
|
*/
|
||||||
internal class SendVerificationMessageWorker(context: Context,
|
internal class SendVerificationMessageWorker(context: Context,
|
||||||
params: WorkerParameters)
|
params: WorkerParameters) :
|
||||||
: SessionSafeCoroutineWorker<SendVerificationMessageWorker.Params>(context, params, Params::class.java) {
|
SessionSafeCoroutineWorker<SendVerificationMessageWorker.Params>(context, params, Params::class.java) {
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class Params(
|
internal data class Params(
|
||||||
|
@ -294,8 +294,8 @@ internal class VerificationTransportRoomMessage(
|
|||||||
hash: String,
|
hash: String,
|
||||||
commitment: String,
|
commitment: String,
|
||||||
messageAuthenticationCode: String,
|
messageAuthenticationCode: String,
|
||||||
shortAuthenticationStrings: List<String>)
|
shortAuthenticationStrings: List<String>): VerificationInfoAccept =
|
||||||
: VerificationInfoAccept = MessageVerificationAcceptContent.create(
|
MessageVerificationAcceptContent.create(
|
||||||
tid,
|
tid,
|
||||||
keyAgreementProtocol,
|
keyAgreementProtocol,
|
||||||
hash,
|
hash,
|
||||||
|
@ -31,8 +31,8 @@ import timber.log.Timber
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal class EventInsertLiveObserver @Inject constructor(@SessionDatabase realmConfiguration: RealmConfiguration,
|
internal class EventInsertLiveObserver @Inject constructor(@SessionDatabase realmConfiguration: RealmConfiguration,
|
||||||
private val processors: Set<@JvmSuppressWildcards EventInsertLiveProcessor>)
|
private val processors: Set<@JvmSuppressWildcards EventInsertLiveProcessor>) :
|
||||||
: RealmLiveEntityObserver<EventInsertEntity>(realmConfiguration) {
|
RealmLiveEntityObserver<EventInsertEntity>(realmConfiguration) {
|
||||||
|
|
||||||
override val query = Monarchy.Query {
|
override val query = Monarchy.Query {
|
||||||
it.where(EventInsertEntity::class.java).equalTo(EventInsertEntityFields.CAN_BE_PROCESSED, true)
|
it.where(EventInsertEntity::class.java).equalTo(EventInsertEntityFields.CAN_BE_PROCESSED, true)
|
||||||
|
@ -34,8 +34,8 @@ import java.util.concurrent.atomic.AtomicReference
|
|||||||
|
|
||||||
internal interface LiveEntityObserver : SessionLifecycleObserver
|
internal interface LiveEntityObserver : SessionLifecycleObserver
|
||||||
|
|
||||||
internal abstract class RealmLiveEntityObserver<T : RealmObject>(protected val realmConfiguration: RealmConfiguration)
|
internal abstract class RealmLiveEntityObserver<T : RealmObject>(protected val realmConfiguration: RealmConfiguration) :
|
||||||
: LiveEntityObserver, RealmChangeListener<RealmResults<T>> {
|
LiveEntityObserver, RealmChangeListener<RealmResults<T>> {
|
||||||
|
|
||||||
private companion object {
|
private companion object {
|
||||||
val BACKGROUND_HANDLER = createBackgroundHandler("LIVE_ENTITY_BACKGROUND")
|
val BACKGROUND_HANDLER = createBackgroundHandler("LIVE_ENTITY_BACKGROUND")
|
||||||
|
@ -32,8 +32,8 @@ import kotlin.concurrent.getOrSet
|
|||||||
* instance. This does check each time if you are on the main thread or not and returns the appropriate realm instance.
|
* instance. This does check each time if you are on the main thread or not and returns the appropriate realm instance.
|
||||||
*/
|
*/
|
||||||
@SessionScope
|
@SessionScope
|
||||||
internal class RealmSessionProvider @Inject constructor(@SessionDatabase private val monarchy: Monarchy)
|
internal class RealmSessionProvider @Inject constructor(@SessionDatabase private val monarchy: Monarchy) :
|
||||||
: SessionLifecycleObserver {
|
SessionLifecycleObserver {
|
||||||
|
|
||||||
private val realmThreadLocal = ThreadLocal<Realm>()
|
private val realmThreadLocal = ThreadLocal<Realm>()
|
||||||
|
|
||||||
|
@ -24,8 +24,8 @@ import org.matrix.android.sdk.api.session.room.model.Membership
|
|||||||
* This class is used to store group info (groupId and membership) from the sync response.
|
* This class is used to store group info (groupId and membership) from the sync response.
|
||||||
* Then GetGroupDataTask is called regularly to fetch group information from the homeserver.
|
* Then GetGroupDataTask is called regularly to fetch group information from the homeserver.
|
||||||
*/
|
*/
|
||||||
internal open class GroupEntity(@PrimaryKey var groupId: String = "")
|
internal open class GroupEntity(@PrimaryKey var groupId: String = "") :
|
||||||
: RealmObject() {
|
RealmObject() {
|
||||||
|
|
||||||
private var membershipStr: String = Membership.NONE.name
|
private var membershipStr: String = Membership.NONE.name
|
||||||
var membership: Membership
|
var membership: Membership
|
||||||
|
@ -29,8 +29,7 @@ internal fun CurrentStateEventEntity.Companion.whereType(realm: Realm, roomId: S
|
|||||||
.equalTo(CurrentStateEventEntityFields.TYPE, type)
|
.equalTo(CurrentStateEventEntityFields.TYPE, type)
|
||||||
}
|
}
|
||||||
|
|
||||||
internal fun CurrentStateEventEntity.Companion.whereStateKey(realm: Realm, roomId: String, type: String, stateKey: String)
|
internal fun CurrentStateEventEntity.Companion.whereStateKey(realm: Realm, roomId: String, type: String, stateKey: String): RealmQuery<CurrentStateEventEntity> {
|
||||||
: RealmQuery<CurrentStateEventEntity> {
|
|
||||||
return whereType(realm = realm, roomId = roomId, type = type)
|
return whereType(realm = realm, roomId = roomId, type = type)
|
||||||
.equalTo(CurrentStateEventEntityFields.STATE_KEY, stateKey)
|
.equalTo(CurrentStateEventEntityFields.STATE_KEY, stateKey)
|
||||||
}
|
}
|
||||||
|
@ -119,8 +119,7 @@ internal fun RealmList<TimelineEventEntity>.find(eventId: String): TimelineEvent
|
|||||||
|
|
||||||
internal fun TimelineEventEntity.Companion.findAllInRoomWithSendStates(realm: Realm,
|
internal fun TimelineEventEntity.Companion.findAllInRoomWithSendStates(realm: Realm,
|
||||||
roomId: String,
|
roomId: String,
|
||||||
sendStates: List<SendState>)
|
sendStates: List<SendState>): RealmResults<TimelineEventEntity> {
|
||||||
: RealmResults<TimelineEventEntity> {
|
|
||||||
return whereRoomId(realm, roomId)
|
return whereRoomId(realm, roomId)
|
||||||
.filterSendStates(sendStates)
|
.filterSendStates(sendStates)
|
||||||
.findAll()
|
.findAll()
|
||||||
|
@ -43,8 +43,8 @@ interface NetworkConnectivityChecker {
|
|||||||
@SessionScope
|
@SessionScope
|
||||||
internal class DefaultNetworkConnectivityChecker @Inject constructor(private val homeServerPinger: HomeServerPinger,
|
internal class DefaultNetworkConnectivityChecker @Inject constructor(private val homeServerPinger: HomeServerPinger,
|
||||||
private val backgroundDetectionObserver: BackgroundDetectionObserver,
|
private val backgroundDetectionObserver: BackgroundDetectionObserver,
|
||||||
private val networkCallbackStrategy: NetworkCallbackStrategy)
|
private val networkCallbackStrategy: NetworkCallbackStrategy) :
|
||||||
: NetworkConnectivityChecker {
|
NetworkConnectivityChecker {
|
||||||
|
|
||||||
private val hasInternetAccess = AtomicBoolean(true)
|
private val hasInternetAccess = AtomicBoolean(true)
|
||||||
private val listeners = Collections.synchronizedSet(LinkedHashSet<NetworkConnectivityChecker.Listener>())
|
private val listeners = Collections.synchronizedSet(LinkedHashSet<NetworkConnectivityChecker.Listener>())
|
||||||
|
@ -29,8 +29,8 @@ import javax.inject.Inject
|
|||||||
private val loggerTag = LoggerTag("CallEventProcessor", LoggerTag.VOIP)
|
private val loggerTag = LoggerTag("CallEventProcessor", LoggerTag.VOIP)
|
||||||
|
|
||||||
@SessionScope
|
@SessionScope
|
||||||
internal class CallEventProcessor @Inject constructor(private val callSignalingHandler: CallSignalingHandler)
|
internal class CallEventProcessor @Inject constructor(private val callSignalingHandler: CallSignalingHandler) :
|
||||||
: EventInsertLiveProcessor {
|
EventInsertLiveProcessor {
|
||||||
|
|
||||||
private val allowedTypes = listOf(
|
private val allowedTypes = listOf(
|
||||||
EventType.CALL_ANSWER,
|
EventType.CALL_ANSWER,
|
||||||
|
@ -63,8 +63,8 @@ private data class NewAttachmentAttributes(
|
|||||||
* Possible previous worker: None
|
* Possible previous worker: None
|
||||||
* Possible next worker : Always [MultipleEventSendingDispatcherWorker]
|
* Possible next worker : Always [MultipleEventSendingDispatcherWorker]
|
||||||
*/
|
*/
|
||||||
internal class UploadContentWorker(val context: Context, params: WorkerParameters)
|
internal class UploadContentWorker(val context: Context, params: WorkerParameters) :
|
||||||
: SessionSafeCoroutineWorker<UploadContentWorker.Params>(context, params, Params::class.java) {
|
SessionSafeCoroutineWorker<UploadContentWorker.Params>(context, params, Params::class.java) {
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class Params(
|
internal data class Params(
|
||||||
|
@ -28,8 +28,8 @@ import javax.inject.Inject
|
|||||||
* Possible previous worker: None
|
* Possible previous worker: None
|
||||||
* Possible next worker : None
|
* Possible next worker : None
|
||||||
*/
|
*/
|
||||||
internal class GetGroupDataWorker(context: Context, params: WorkerParameters)
|
internal class GetGroupDataWorker(context: Context, params: WorkerParameters) :
|
||||||
: SessionSafeCoroutineWorker<GetGroupDataWorker.Params>(context, params, Params::class.java) {
|
SessionSafeCoroutineWorker<GetGroupDataWorker.Params>(context, params, Params::class.java) {
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class Params(
|
internal data class Params(
|
||||||
|
@ -23,8 +23,8 @@ import org.matrix.android.sdk.internal.session.SessionScope
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
@SessionScope
|
@SessionScope
|
||||||
internal class DefaultSyncStatusService @Inject constructor()
|
internal class DefaultSyncStatusService @Inject constructor() :
|
||||||
: SyncStatusService,
|
SyncStatusService,
|
||||||
ProgressReporter {
|
ProgressReporter {
|
||||||
|
|
||||||
private val status = MutableLiveData<SyncStatusService.Status>()
|
private val status = MutableLiveData<SyncStatusService.Status>()
|
||||||
|
@ -58,8 +58,8 @@ internal class IntegrationManager @Inject constructor(matrixConfiguration: Matri
|
|||||||
@SessionDatabase private val monarchy: Monarchy,
|
@SessionDatabase private val monarchy: Monarchy,
|
||||||
private val updateUserAccountDataTask: UpdateUserAccountDataTask,
|
private val updateUserAccountDataTask: UpdateUserAccountDataTask,
|
||||||
private val accountDataDataSource: UserAccountDataDataSource,
|
private val accountDataDataSource: UserAccountDataDataSource,
|
||||||
private val widgetFactory: WidgetFactory)
|
private val widgetFactory: WidgetFactory) :
|
||||||
: SessionLifecycleObserver {
|
SessionLifecycleObserver {
|
||||||
|
|
||||||
private val currentConfigs = ArrayList<IntegrationManagerConfig>()
|
private val currentConfigs = ArrayList<IntegrationManagerConfig>()
|
||||||
private val lifecycleOwner: LifecycleOwner = LifecycleOwner { lifecycleRegistry }
|
private val lifecycleOwner: LifecycleOwner = LifecycleOwner { lifecycleRegistry }
|
||||||
|
@ -33,8 +33,8 @@ import org.matrix.android.sdk.internal.worker.SessionSafeCoroutineWorker
|
|||||||
import org.matrix.android.sdk.internal.worker.SessionWorkerParams
|
import org.matrix.android.sdk.internal.worker.SessionWorkerParams
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal class AddPusherWorker(context: Context, params: WorkerParameters)
|
internal class AddPusherWorker(context: Context, params: WorkerParameters) :
|
||||||
: SessionSafeCoroutineWorker<AddPusherWorker.Params>(context, params, Params::class.java) {
|
SessionSafeCoroutineWorker<AddPusherWorker.Params>(context, params, Params::class.java) {
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class Params(
|
internal data class Params(
|
||||||
|
@ -93,13 +93,11 @@ internal class DefaultRoomService @Inject constructor(
|
|||||||
return roomSummaryDataSource.getRoomSummariesLive(queryParams)
|
return roomSummaryDataSource.getRoomSummariesLive(queryParams)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getPagedRoomSummariesLive(queryParams: RoomSummaryQueryParams, pagedListConfig: PagedList.Config, sortOrder: RoomSortOrder)
|
override fun getPagedRoomSummariesLive(queryParams: RoomSummaryQueryParams, pagedListConfig: PagedList.Config, sortOrder: RoomSortOrder): LiveData<PagedList<RoomSummary>> {
|
||||||
: LiveData<PagedList<RoomSummary>> {
|
|
||||||
return roomSummaryDataSource.getSortedPagedRoomSummariesLive(queryParams, pagedListConfig, sortOrder)
|
return roomSummaryDataSource.getSortedPagedRoomSummariesLive(queryParams, pagedListConfig, sortOrder)
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun getFilteredPagedRoomSummariesLive(queryParams: RoomSummaryQueryParams, pagedListConfig: PagedList.Config, sortOrder: RoomSortOrder)
|
override fun getFilteredPagedRoomSummariesLive(queryParams: RoomSummaryQueryParams, pagedListConfig: PagedList.Config, sortOrder: RoomSortOrder): UpdatableLivePageResult {
|
||||||
: UpdatableLivePageResult {
|
|
||||||
return roomSummaryDataSource.getUpdatablePagedRoomSummariesLive(queryParams, pagedListConfig, sortOrder)
|
return roomSummaryDataSource.getUpdatablePagedRoomSummariesLive(queryParams, pagedListConfig, sortOrder)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,8 +31,8 @@ import org.matrix.android.sdk.internal.di.SessionDatabase
|
|||||||
|
|
||||||
internal class DefaultRoomPushRuleService @AssistedInject constructor(@Assisted private val roomId: String,
|
internal class DefaultRoomPushRuleService @AssistedInject constructor(@Assisted private val roomId: String,
|
||||||
private val setRoomNotificationStateTask: SetRoomNotificationStateTask,
|
private val setRoomNotificationStateTask: SetRoomNotificationStateTask,
|
||||||
@SessionDatabase private val monarchy: Monarchy)
|
@SessionDatabase private val monarchy: Monarchy) :
|
||||||
: RoomPushRuleService {
|
RoomPushRuleService {
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
interface Factory {
|
interface Factory {
|
||||||
|
@ -37,8 +37,8 @@ internal interface SetRoomNotificationStateTask : Task<SetRoomNotificationStateT
|
|||||||
|
|
||||||
internal class DefaultSetRoomNotificationStateTask @Inject constructor(@SessionDatabase private val monarchy: Monarchy,
|
internal class DefaultSetRoomNotificationStateTask @Inject constructor(@SessionDatabase private val monarchy: Monarchy,
|
||||||
private val removePushRuleTask: RemovePushRuleTask,
|
private val removePushRuleTask: RemovePushRuleTask,
|
||||||
private val addPushRuleTask: AddPushRuleTask)
|
private val addPushRuleTask: AddPushRuleTask) :
|
||||||
: SetRoomNotificationStateTask {
|
SetRoomNotificationStateTask {
|
||||||
|
|
||||||
override suspend fun execute(params: SetRoomNotificationStateTask.Params) {
|
override suspend fun execute(params: SetRoomNotificationStateTask.Params) {
|
||||||
val currentRoomPushRule = Realm.getInstance(monarchy.realmConfiguration).use {
|
val currentRoomPushRule = Realm.getInstance(monarchy.realmConfiguration).use {
|
||||||
|
@ -54,8 +54,8 @@ internal class DefaultRelationService @AssistedInject constructor(
|
|||||||
private val fetchEditHistoryTask: FetchEditHistoryTask,
|
private val fetchEditHistoryTask: FetchEditHistoryTask,
|
||||||
private val timelineEventMapper: TimelineEventMapper,
|
private val timelineEventMapper: TimelineEventMapper,
|
||||||
@SessionDatabase private val monarchy: Monarchy,
|
@SessionDatabase private val monarchy: Monarchy,
|
||||||
private val taskExecutor: TaskExecutor)
|
private val taskExecutor: TaskExecutor) :
|
||||||
: RelationService {
|
RelationService {
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
interface Factory {
|
interface Factory {
|
||||||
|
@ -33,8 +33,8 @@ import org.matrix.android.sdk.internal.worker.SessionWorkerParams
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
// TODO This is not used. Delete?
|
// TODO This is not used. Delete?
|
||||||
internal class SendRelationWorker(context: Context, params: WorkerParameters)
|
internal class SendRelationWorker(context: Context, params: WorkerParameters) :
|
||||||
: SessionSafeCoroutineWorker<SendRelationWorker.Params>(context, params, Params::class.java) {
|
SessionSafeCoroutineWorker<SendRelationWorker.Params>(context, params, Params::class.java) {
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class Params(
|
internal data class Params(
|
||||||
|
@ -38,8 +38,8 @@ import javax.inject.Inject
|
|||||||
* Possible previous worker: Always [UploadContentWorker]
|
* Possible previous worker: Always [UploadContentWorker]
|
||||||
* Possible next worker : None, but it will post new work to send events, encrypted or not
|
* Possible next worker : None, but it will post new work to send events, encrypted or not
|
||||||
*/
|
*/
|
||||||
internal class MultipleEventSendingDispatcherWorker(context: Context, params: WorkerParameters)
|
internal class MultipleEventSendingDispatcherWorker(context: Context, params: WorkerParameters) :
|
||||||
: SessionSafeCoroutineWorker<MultipleEventSendingDispatcherWorker.Params>(context, params, Params::class.java) {
|
SessionSafeCoroutineWorker<MultipleEventSendingDispatcherWorker.Params>(context, params, Params::class.java) {
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class Params(
|
internal data class Params(
|
||||||
|
@ -32,8 +32,8 @@ import javax.inject.Inject
|
|||||||
* Possible previous worker: None
|
* Possible previous worker: None
|
||||||
* Possible next worker : None
|
* Possible next worker : None
|
||||||
*/
|
*/
|
||||||
internal class RedactEventWorker(context: Context, params: WorkerParameters)
|
internal class RedactEventWorker(context: Context, params: WorkerParameters) :
|
||||||
: SessionSafeCoroutineWorker<RedactEventWorker.Params>(context, params, Params::class.java) {
|
SessionSafeCoroutineWorker<RedactEventWorker.Params>(context, params, Params::class.java) {
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class Params(
|
internal data class Params(
|
||||||
|
@ -39,8 +39,8 @@ import javax.inject.Inject
|
|||||||
* Possible next worker : None
|
* Possible next worker : None
|
||||||
*/
|
*/
|
||||||
internal class SendEventWorker(context: Context,
|
internal class SendEventWorker(context: Context,
|
||||||
params: WorkerParameters)
|
params: WorkerParameters) :
|
||||||
: SessionSafeCoroutineWorker<SendEventWorker.Params>(context, params, Params::class.java) {
|
SessionSafeCoroutineWorker<SendEventWorker.Params>(context, params, Params::class.java) {
|
||||||
|
|
||||||
@JsonClass(generateAdapter = true)
|
@JsonClass(generateAdapter = true)
|
||||||
internal data class Params(
|
internal data class Params(
|
||||||
|
@ -40,8 +40,8 @@ internal class LiveTimelineEvent(private val monarchy: Monarchy,
|
|||||||
private val coroutineScope: CoroutineScope,
|
private val coroutineScope: CoroutineScope,
|
||||||
private val timelineEventMapper: TimelineEventMapper,
|
private val timelineEventMapper: TimelineEventMapper,
|
||||||
private val roomId: String,
|
private val roomId: String,
|
||||||
private val eventId: String)
|
private val eventId: String) :
|
||||||
: MediatorLiveData<Optional<TimelineEvent>>() {
|
MediatorLiveData<Optional<TimelineEvent>>() {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
buildAndObserveQuery()
|
buildAndObserveQuery()
|
||||||
|
@ -22,8 +22,8 @@ import org.matrix.android.sdk.api.session.thirdparty.model.ThirdPartyUser
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal class DefaultThirdPartyService @Inject constructor(private val getThirdPartyProtocolTask: GetThirdPartyProtocolsTask,
|
internal class DefaultThirdPartyService @Inject constructor(private val getThirdPartyProtocolTask: GetThirdPartyProtocolsTask,
|
||||||
private val getThirdPartyUserTask: GetThirdPartyUserTask)
|
private val getThirdPartyUserTask: GetThirdPartyUserTask) :
|
||||||
: ThirdPartyService {
|
ThirdPartyService {
|
||||||
|
|
||||||
override suspend fun getThirdPartyProtocols(): Map<String, ThirdPartyProtocol> {
|
override suspend fun getThirdPartyProtocols(): Map<String, ThirdPartyProtocol> {
|
||||||
return getThirdPartyProtocolTask.execute(Unit)
|
return getThirdPartyProtocolTask.execute(Unit)
|
||||||
|
@ -29,8 +29,8 @@ import java.util.HashMap
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal class DefaultWidgetPostAPIMediator @Inject constructor(private val moshi: Moshi,
|
internal class DefaultWidgetPostAPIMediator @Inject constructor(private val moshi: Moshi,
|
||||||
private val widgetPostMessageAPIProvider: WidgetPostMessageAPIProvider)
|
private val widgetPostMessageAPIProvider: WidgetPostMessageAPIProvider) :
|
||||||
: WidgetPostAPIMediator {
|
WidgetPostAPIMediator {
|
||||||
|
|
||||||
private val jsonAdapter = moshi.adapter<JsonDict>(JSON_DICT_PARAMETERIZED_TYPE)
|
private val jsonAdapter = moshi.adapter<JsonDict>(JSON_DICT_PARAMETERIZED_TYPE)
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ import javax.inject.Provider
|
|||||||
|
|
||||||
internal class DefaultWidgetService @Inject constructor(private val widgetManager: WidgetManager,
|
internal class DefaultWidgetService @Inject constructor(private val widgetManager: WidgetManager,
|
||||||
private val widgetURLFormatter: WidgetURLFormatter,
|
private val widgetURLFormatter: WidgetURLFormatter,
|
||||||
private val widgetPostAPIMediator: Provider<WidgetPostAPIMediator>)
|
private val widgetPostAPIMediator: Provider<WidgetPostAPIMediator>) :
|
||||||
: WidgetService {
|
WidgetService {
|
||||||
|
|
||||||
override fun getWidgetURLFormatter(): WidgetURLFormatter {
|
override fun getWidgetURLFormatter(): WidgetURLFormatter {
|
||||||
return widgetURLFormatter
|
return widgetURLFormatter
|
||||||
|
@ -51,9 +51,9 @@ internal class WidgetManager @Inject constructor(private val integrationManager:
|
|||||||
private val stateEventDataSource: StateEventDataSource,
|
private val stateEventDataSource: StateEventDataSource,
|
||||||
private val createWidgetTask: CreateWidgetTask,
|
private val createWidgetTask: CreateWidgetTask,
|
||||||
private val widgetFactory: WidgetFactory,
|
private val widgetFactory: WidgetFactory,
|
||||||
@UserId private val userId: String)
|
@UserId private val userId: String) :
|
||||||
|
|
||||||
: IntegrationManagerService.Listener, SessionLifecycleObserver {
|
IntegrationManagerService.Listener, SessionLifecycleObserver {
|
||||||
|
|
||||||
private val lifecycleOwner: LifecycleOwner = LifecycleOwner { lifecycleRegistry }
|
private val lifecycleOwner: LifecycleOwner = LifecycleOwner { lifecycleRegistry }
|
||||||
private val lifecycleRegistry: LifecycleRegistry = LifecycleRegistry(lifecycleOwner)
|
private val lifecycleRegistry: LifecycleRegistry = LifecycleRegistry(lifecycleOwner)
|
||||||
|
@ -19,7 +19,7 @@ package org.matrix.android.sdk.internal.util.system
|
|||||||
import android.os.Build
|
import android.os.Build
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
internal class DefaultBuildVersionSdkIntProvider @Inject constructor()
|
internal class DefaultBuildVersionSdkIntProvider @Inject constructor() :
|
||||||
: BuildVersionSdkIntProvider {
|
BuildVersionSdkIntProvider {
|
||||||
override fun get() = Build.VERSION.SDK_INT
|
override fun get() = Build.VERSION.SDK_INT
|
||||||
}
|
}
|
||||||
|
@ -19,8 +19,8 @@ import android.content.Context
|
|||||||
import androidx.work.Worker
|
import androidx.work.Worker
|
||||||
import androidx.work.WorkerParameters
|
import androidx.work.WorkerParameters
|
||||||
|
|
||||||
internal class AlwaysSuccessfulWorker(context: Context, params: WorkerParameters)
|
internal class AlwaysSuccessfulWorker(context: Context, params: WorkerParameters) :
|
||||||
: Worker(context, params) {
|
Worker(context, params) {
|
||||||
|
|
||||||
override fun doWork(): Result {
|
override fun doWork(): Result {
|
||||||
return Result.success()
|
return Result.success()
|
||||||
|
@ -26,8 +26,8 @@ import javax.inject.Inject
|
|||||||
* No op interceptor
|
* No op interceptor
|
||||||
*/
|
*/
|
||||||
@MatrixScope
|
@MatrixScope
|
||||||
internal class CurlLoggingInterceptor @Inject constructor()
|
internal class CurlLoggingInterceptor @Inject constructor() :
|
||||||
: Interceptor {
|
Interceptor {
|
||||||
|
|
||||||
@Throws(IOException::class)
|
@Throws(IOException::class)
|
||||||
override fun intercept(chain: Interceptor.Chain): Response {
|
override fun intercept(chain: Interceptor.Chain): Response {
|
||||||
|
@ -27,8 +27,8 @@ import javax.inject.Inject
|
|||||||
* Test that the application is started on boot
|
* Test that the application is started on boot
|
||||||
*/
|
*/
|
||||||
class TestAutoStartBoot @Inject constructor(private val vectorPreferences: VectorPreferences,
|
class TestAutoStartBoot @Inject constructor(private val vectorPreferences: VectorPreferences,
|
||||||
private val stringProvider: StringProvider)
|
private val stringProvider: StringProvider) :
|
||||||
: TroubleshootTest(R.string.settings_troubleshoot_test_service_boot_title) {
|
TroubleshootTest(R.string.settings_troubleshoot_test_service_boot_title) {
|
||||||
|
|
||||||
override fun perform(activityResultLauncher: ActivityResultLauncher<Intent>) {
|
override fun perform(activityResultLauncher: ActivityResultLauncher<Intent>) {
|
||||||
if (vectorPreferences.autoStartOnBoot()) {
|
if (vectorPreferences.autoStartOnBoot()) {
|
||||||
|
@ -27,8 +27,8 @@ import im.vector.app.features.settings.troubleshoot.TroubleshootTest
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class TestBackgroundRestrictions @Inject constructor(private val context: AppCompatActivity,
|
class TestBackgroundRestrictions @Inject constructor(private val context: AppCompatActivity,
|
||||||
private val stringProvider: StringProvider)
|
private val stringProvider: StringProvider) :
|
||||||
: TroubleshootTest(R.string.settings_troubleshoot_test_bg_restricted_title) {
|
TroubleshootTest(R.string.settings_troubleshoot_test_bg_restricted_title) {
|
||||||
|
|
||||||
override fun perform(activityResultLauncher: ActivityResultLauncher<Intent>) {
|
override fun perform(activityResultLauncher: ActivityResultLauncher<Intent>) {
|
||||||
context.getSystemService<ConnectivityManager>()!!.apply {
|
context.getSystemService<ConnectivityManager>()!!.apply {
|
||||||
|
@ -30,8 +30,8 @@ import javax.inject.Inject
|
|||||||
* Check that the play services APK is available an up-to-date. If needed provide quick fix to install it.
|
* Check that the play services APK is available an up-to-date. If needed provide quick fix to install it.
|
||||||
*/
|
*/
|
||||||
class TestPlayServices @Inject constructor(private val context: AppCompatActivity,
|
class TestPlayServices @Inject constructor(private val context: AppCompatActivity,
|
||||||
private val stringProvider: StringProvider)
|
private val stringProvider: StringProvider) :
|
||||||
: TroubleshootTest(R.string.settings_troubleshoot_test_play_services_title) {
|
TroubleshootTest(R.string.settings_troubleshoot_test_play_services_title) {
|
||||||
|
|
||||||
override fun perform(activityResultLauncher: ActivityResultLauncher<Intent>) {
|
override fun perform(activityResultLauncher: ActivityResultLauncher<Intent>) {
|
||||||
val apiAvailability = GoogleApiAvailability.getInstance()
|
val apiAvailability = GoogleApiAvailability.getInstance()
|
||||||
|
@ -40,8 +40,8 @@ class TestPushFromPushGateway @Inject constructor(private val context: AppCompat
|
|||||||
private val stringProvider: StringProvider,
|
private val stringProvider: StringProvider,
|
||||||
private val errorFormatter: ErrorFormatter,
|
private val errorFormatter: ErrorFormatter,
|
||||||
private val pushersManager: PushersManager,
|
private val pushersManager: PushersManager,
|
||||||
private val activeSessionHolder: ActiveSessionHolder)
|
private val activeSessionHolder: ActiveSessionHolder) :
|
||||||
: TroubleshootTest(R.string.settings_troubleshoot_test_push_loop_title) {
|
TroubleshootTest(R.string.settings_troubleshoot_test_push_loop_title) {
|
||||||
|
|
||||||
private var action: Job? = null
|
private var action: Job? = null
|
||||||
private var pushReceived: Boolean = false
|
private var pushReceived: Boolean = false
|
||||||
|
@ -36,8 +36,8 @@ import javax.inject.Inject
|
|||||||
class TestTokenRegistration @Inject constructor(private val context: AppCompatActivity,
|
class TestTokenRegistration @Inject constructor(private val context: AppCompatActivity,
|
||||||
private val stringProvider: StringProvider,
|
private val stringProvider: StringProvider,
|
||||||
private val pushersManager: PushersManager,
|
private val pushersManager: PushersManager,
|
||||||
private val activeSessionHolder: ActiveSessionHolder)
|
private val activeSessionHolder: ActiveSessionHolder) :
|
||||||
: TroubleshootTest(R.string.settings_troubleshoot_test_token_registration_title) {
|
TroubleshootTest(R.string.settings_troubleshoot_test_token_registration_title) {
|
||||||
|
|
||||||
override fun perform(activityResultLauncher: ActivityResultLauncher<Intent>) {
|
override fun perform(activityResultLauncher: ActivityResultLauncher<Intent>) {
|
||||||
// Check if we have a registered pusher for this token
|
// Check if we have a registered pusher for this token
|
||||||
|
@ -23,8 +23,8 @@ import org.threeten.bp.format.DateTimeFormatter
|
|||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class DefaultDateFormatterProvider @Inject constructor(private val context: Context,
|
class DefaultDateFormatterProvider @Inject constructor(private val context: Context,
|
||||||
private val localeProvider: LocaleProvider)
|
private val localeProvider: LocaleProvider) :
|
||||||
: DateFormatterProvider {
|
DateFormatterProvider {
|
||||||
|
|
||||||
override val dateWithMonthFormatter: DateTimeFormatter by lazy {
|
override val dateWithMonthFormatter: DateTimeFormatter by lazy {
|
||||||
val pattern = DateFormat.getBestDateTimePattern(localeProvider.current(), "d MMMMM")
|
val pattern = DateFormat.getBestDateTimePattern(localeProvider.current(), "d MMMMM")
|
||||||
|
@ -42,8 +42,8 @@ class AvatarPlaceholderModelLoaderFactory(private val context: Context) : ModelL
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AvatarPlaceholderModelLoader(private val context: Context)
|
class AvatarPlaceholderModelLoader(private val context: Context) :
|
||||||
: ModelLoader<AvatarPlaceholder, Drawable> {
|
ModelLoader<AvatarPlaceholder, Drawable> {
|
||||||
|
|
||||||
override fun buildLoadData(model: AvatarPlaceholder, width: Int, height: Int, options: Options): ModelLoader.LoadData<Drawable>? {
|
override fun buildLoadData(model: AvatarPlaceholder, width: Int, height: Int, options: Options): ModelLoader.LoadData<Drawable>? {
|
||||||
return ModelLoader.LoadData(ObjectKey(model), AvatarPlaceholderDataFetcher(context, model))
|
return ModelLoader.LoadData(ObjectKey(model), AvatarPlaceholderDataFetcher(context, model))
|
||||||
@ -54,8 +54,8 @@ class AvatarPlaceholderModelLoader(private val context: Context)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class AvatarPlaceholderDataFetcher(context: Context, private val data: AvatarPlaceholder)
|
class AvatarPlaceholderDataFetcher(context: Context, private val data: AvatarPlaceholder) :
|
||||||
: DataFetcher<Drawable> {
|
DataFetcher<Drawable> {
|
||||||
|
|
||||||
private val avatarRenderer = context.vectorComponent().avatarRenderer()
|
private val avatarRenderer = context.vectorComponent().avatarRenderer()
|
||||||
|
|
||||||
|
@ -48,8 +48,8 @@ class VectorGlideModelLoaderFactory(private val context: Context) : ModelLoaderF
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
class VectorGlideModelLoader(private val context: Context)
|
class VectorGlideModelLoader(private val context: Context) :
|
||||||
: ModelLoader<ImageContentRenderer.Data, InputStream> {
|
ModelLoader<ImageContentRenderer.Data, InputStream> {
|
||||||
override fun handles(model: ImageContentRenderer.Data): Boolean {
|
override fun handles(model: ImageContentRenderer.Data): Boolean {
|
||||||
// Always handle
|
// Always handle
|
||||||
return true
|
return true
|
||||||
@ -63,8 +63,8 @@ class VectorGlideModelLoader(private val context: Context)
|
|||||||
class VectorGlideDataFetcher(context: Context,
|
class VectorGlideDataFetcher(context: Context,
|
||||||
private val data: ImageContentRenderer.Data,
|
private val data: ImageContentRenderer.Data,
|
||||||
private val width: Int,
|
private val width: Int,
|
||||||
private val height: Int)
|
private val height: Int) :
|
||||||
: DataFetcher<InputStream> {
|
DataFetcher<InputStream> {
|
||||||
|
|
||||||
private val localFilesHelper = LocalFilesHelper(context)
|
private val localFilesHelper = LocalFilesHelper(context)
|
||||||
private val activeSessionHolder = context.vectorComponent().activeSessionHolder()
|
private val activeSessionHolder = context.vectorComponent().activeSessionHolder()
|
||||||
|
@ -28,8 +28,8 @@ import im.vector.app.core.epoxy.ClickListener
|
|||||||
import im.vector.app.core.epoxy.onClick
|
import im.vector.app.core.epoxy.onClick
|
||||||
import im.vector.app.databinding.ViewButtonStateBinding
|
import im.vector.app.databinding.ViewButtonStateBinding
|
||||||
|
|
||||||
class ButtonStateView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0)
|
class ButtonStateView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0) :
|
||||||
: FrameLayout(context, attrs, defStyle) {
|
FrameLayout(context, attrs, defStyle) {
|
||||||
|
|
||||||
sealed class State {
|
sealed class State {
|
||||||
object Button : State()
|
object Button : State()
|
||||||
|
@ -24,8 +24,8 @@ import im.vector.app.R
|
|||||||
|
|
||||||
private const val DEFAULT_MAX_HEIGHT = 200
|
private const val DEFAULT_MAX_HEIGHT = 200
|
||||||
|
|
||||||
class MaxHeightScrollView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0)
|
class MaxHeightScrollView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0) :
|
||||||
: NestedScrollView(context, attrs, defStyle) {
|
NestedScrollView(context, attrs, defStyle) {
|
||||||
|
|
||||||
var maxHeight: Int = 0
|
var maxHeight: Int = 0
|
||||||
set(value) {
|
set(value) {
|
||||||
|
@ -26,8 +26,8 @@ import im.vector.app.R
|
|||||||
import im.vector.app.core.extensions.updateConstraintSet
|
import im.vector.app.core.extensions.updateConstraintSet
|
||||||
import im.vector.app.databinding.ViewStateBinding
|
import im.vector.app.databinding.ViewStateBinding
|
||||||
|
|
||||||
class StateView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0)
|
class StateView @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyle: Int = 0) :
|
||||||
: FrameLayout(context, attrs, defStyle) {
|
FrameLayout(context, attrs, defStyle) {
|
||||||
|
|
||||||
sealed class State {
|
sealed class State {
|
||||||
object Content : State()
|
object Content : State()
|
||||||
|
@ -25,5 +25,5 @@ interface VectorSharedAction
|
|||||||
/**
|
/**
|
||||||
* Parent class to handle navigation events, action events, or other any events
|
* Parent class to handle navigation events, action events, or other any events
|
||||||
*/
|
*/
|
||||||
open class VectorSharedActionViewModel<T : VectorSharedAction>(private val store: MutableDataSource<T> = PublishDataSource())
|
open class VectorSharedActionViewModel<T : VectorSharedAction>(private val store: MutableDataSource<T> = PublishDataSource()) :
|
||||||
: ViewModel(), MutableDataSource<T> by store
|
ViewModel(), MutableDataSource<T> by store
|
||||||
|
@ -27,8 +27,8 @@ import im.vector.app.core.utils.PublishDataSource
|
|||||||
import io.reactivex.Observable
|
import io.reactivex.Observable
|
||||||
import io.reactivex.Single
|
import io.reactivex.Single
|
||||||
|
|
||||||
abstract class VectorViewModel<S : MvRxState, VA : VectorViewModelAction, VE : VectorViewEvents>(initialState: S)
|
abstract class VectorViewModel<S : MvRxState, VA : VectorViewModelAction, VE : VectorViewEvents>(initialState: S) :
|
||||||
: BaseMvRxViewModel<S>(initialState, false) {
|
BaseMvRxViewModel<S>(initialState, false) {
|
||||||
|
|
||||||
interface Factory<S : MvRxState> {
|
interface Factory<S : MvRxState> {
|
||||||
fun create(state: S): BaseMvRxViewModel<S>
|
fun create(state: S): BaseMvRxViewModel<S>
|
||||||
|
@ -20,8 +20,8 @@ import com.airbnb.epoxy.TypedEpoxyController
|
|||||||
/**
|
/**
|
||||||
* Epoxy controller for generic bottom sheet actions
|
* Epoxy controller for generic bottom sheet actions
|
||||||
*/
|
*/
|
||||||
abstract class BottomSheetGenericController<State : BottomSheetGenericState, Action : BottomSheetGenericRadioAction>
|
abstract class BottomSheetGenericController<State : BottomSheetGenericState, Action : BottomSheetGenericRadioAction> :
|
||||||
: TypedEpoxyController<State>() {
|
TypedEpoxyController<State>() {
|
||||||
|
|
||||||
var listener: Listener<Action>? = null
|
var listener: Listener<Action>? = null
|
||||||
|
|
||||||
|
@ -35,8 +35,8 @@ import im.vector.app.databinding.ViewPasswordStrengthBarBinding
|
|||||||
class PasswordStrengthBar @JvmOverloads constructor(
|
class PasswordStrengthBar @JvmOverloads constructor(
|
||||||
context: Context,
|
context: Context,
|
||||||
attrs: AttributeSet? = null,
|
attrs: AttributeSet? = null,
|
||||||
defStyleAttr: Int = 0)
|
defStyleAttr: Int = 0) :
|
||||||
: LinearLayout(context, attrs, defStyleAttr) {
|
LinearLayout(context, attrs, defStyleAttr) {
|
||||||
|
|
||||||
private val views: ViewPasswordStrengthBarBinding
|
private val views: ViewPasswordStrengthBarBinding
|
||||||
|
|
||||||
|
@ -52,8 +52,7 @@ private var permissionDialogDisplayed = false
|
|||||||
* So when the user does not grant the permission and check the box do not ask again, this boolean will be false.
|
* So when the user does not grant the permission and check the box do not ask again, this boolean will be false.
|
||||||
* Only useful if the first boolean is false
|
* Only useful if the first boolean is false
|
||||||
*/
|
*/
|
||||||
fun ComponentActivity.registerForPermissionsResult(lambda: (allGranted: Boolean, deniedPermanently: Boolean) -> Unit)
|
fun ComponentActivity.registerForPermissionsResult(lambda: (allGranted: Boolean, deniedPermanently: Boolean) -> Unit): ActivityResultLauncher<Array<String>> {
|
||||||
: ActivityResultLauncher<Array<String>> {
|
|
||||||
return registerForActivityResult(ActivityResultContracts.RequestMultiplePermissions()) { result ->
|
return registerForActivityResult(ActivityResultContracts.RequestMultiplePermissions()) { result ->
|
||||||
onPermissionResult(result, lambda)
|
onPermissionResult(result, lambda)
|
||||||
}
|
}
|
||||||
|
@ -53,8 +53,8 @@ private const val ANIMATION_DURATION = 250
|
|||||||
*/
|
*/
|
||||||
class AttachmentTypeSelectorView(context: Context,
|
class AttachmentTypeSelectorView(context: Context,
|
||||||
inflater: LayoutInflater,
|
inflater: LayoutInflater,
|
||||||
var callback: Callback?)
|
var callback: Callback?) :
|
||||||
: PopupWindow(context) {
|
PopupWindow(context) {
|
||||||
|
|
||||||
interface Callback {
|
interface Callback {
|
||||||
fun onTypeSelected(type: Type)
|
fun onTypeSelected(type: Type)
|
||||||
|
@ -20,8 +20,8 @@ package im.vector.app.features.attachments.preview
|
|||||||
import im.vector.app.core.extensions.exhaustive
|
import im.vector.app.core.extensions.exhaustive
|
||||||
import im.vector.app.core.platform.VectorViewModel
|
import im.vector.app.core.platform.VectorViewModel
|
||||||
|
|
||||||
class AttachmentsPreviewViewModel(initialState: AttachmentsPreviewViewState)
|
class AttachmentsPreviewViewModel(initialState: AttachmentsPreviewViewState) :
|
||||||
: VectorViewModel<AttachmentsPreviewViewState, AttachmentsPreviewAction, AttachmentsPreviewViewEvents>(initialState) {
|
VectorViewModel<AttachmentsPreviewViewState, AttachmentsPreviewAction, AttachmentsPreviewViewEvents>(initialState) {
|
||||||
|
|
||||||
override fun handle(action: AttachmentsPreviewAction) {
|
override fun handle(action: AttachmentsPreviewAction) {
|
||||||
when (action) {
|
when (action) {
|
||||||
|
@ -51,8 +51,8 @@ class ConferenceEventEmitter(private val context: Context) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class ConferenceEventObserver(private val context: Context,
|
class ConferenceEventObserver(private val context: Context,
|
||||||
private val onBroadcastEvent: (ConferenceEvent) -> Unit)
|
private val onBroadcastEvent: (ConferenceEvent) -> Unit) :
|
||||||
: LifecycleObserver {
|
LifecycleObserver {
|
||||||
|
|
||||||
// See https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-android-sdk#listening-for-broadcasted-events
|
// See https://jitsi.github.io/handbook/docs/dev-guide/dev-guide-android-sdk#listening-for-broadcasted-events
|
||||||
private val broadcastReceiver = object : BroadcastReceiver() {
|
private val broadcastReceiver = object : BroadcastReceiver() {
|
||||||
|
@ -37,8 +37,8 @@ import org.matrix.android.sdk.api.session.call.MxCall
|
|||||||
class CallTransferViewModel @AssistedInject constructor(@Assisted initialState: CallTransferViewState,
|
class CallTransferViewModel @AssistedInject constructor(@Assisted initialState: CallTransferViewState,
|
||||||
private val dialPadLookup: DialPadLookup,
|
private val dialPadLookup: DialPadLookup,
|
||||||
private val directRoomHelper: DirectRoomHelper,
|
private val directRoomHelper: DirectRoomHelper,
|
||||||
private val callManager: WebRtcCallManager)
|
private val callManager: WebRtcCallManager) :
|
||||||
: VectorViewModel<CallTransferViewState, CallTransferAction, CallTransferViewEvents>(initialState) {
|
VectorViewModel<CallTransferViewState, CallTransferAction, CallTransferViewEvents>(initialState) {
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
interface Factory {
|
interface Factory {
|
||||||
|
@ -41,8 +41,8 @@ import timber.log.Timber
|
|||||||
class ContactsBookViewModel @AssistedInject constructor(@Assisted
|
class ContactsBookViewModel @AssistedInject constructor(@Assisted
|
||||||
initialState: ContactsBookViewState,
|
initialState: ContactsBookViewState,
|
||||||
private val contactsDataSource: ContactsDataSource,
|
private val contactsDataSource: ContactsDataSource,
|
||||||
private val session: Session)
|
private val session: Session) :
|
||||||
: VectorViewModel<ContactsBookViewState, ContactsBookAction, EmptyViewEvents>(initialState) {
|
VectorViewModel<ContactsBookViewState, ContactsBookAction, EmptyViewEvents>(initialState) {
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
interface Factory {
|
interface Factory {
|
||||||
|
@ -41,8 +41,8 @@ import org.matrix.android.sdk.api.session.room.model.create.CreateRoomParams
|
|||||||
class CreateDirectRoomViewModel @AssistedInject constructor(@Assisted
|
class CreateDirectRoomViewModel @AssistedInject constructor(@Assisted
|
||||||
initialState: CreateDirectRoomViewState,
|
initialState: CreateDirectRoomViewState,
|
||||||
private val rawService: RawService,
|
private val rawService: RawService,
|
||||||
val session: Session)
|
val session: Session) :
|
||||||
: VectorViewModel<CreateDirectRoomViewState, CreateDirectRoomAction, CreateDirectRoomViewEvents>(initialState) {
|
VectorViewModel<CreateDirectRoomViewState, CreateDirectRoomAction, CreateDirectRoomViewEvents>(initialState) {
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
interface Factory {
|
interface Factory {
|
||||||
|
@ -30,8 +30,8 @@ import im.vector.app.databinding.FragmentKeysBackupRestoreFromKeyBinding
|
|||||||
import org.matrix.android.sdk.api.extensions.tryOrNull
|
import org.matrix.android.sdk.api.extensions.tryOrNull
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class KeysBackupRestoreFromKeyFragment @Inject constructor()
|
class KeysBackupRestoreFromKeyFragment @Inject constructor() :
|
||||||
: VectorBaseFragment<FragmentKeysBackupRestoreFromKeyBinding>() {
|
VectorBaseFragment<FragmentKeysBackupRestoreFromKeyBinding>() {
|
||||||
|
|
||||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentKeysBackupRestoreFromKeyBinding {
|
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentKeysBackupRestoreFromKeyBinding {
|
||||||
return FragmentKeysBackupRestoreFromKeyBinding.inflate(inflater, container, false)
|
return FragmentKeysBackupRestoreFromKeyBinding.inflate(inflater, container, false)
|
||||||
|
@ -26,5 +26,5 @@ import org.matrix.android.sdk.internal.crypto.keysbackup.model.rest.KeysVersionR
|
|||||||
data class KeysBackupSettingViewState(val keysBackupVersionTrust: Async<KeysBackupVersionTrust> = Uninitialized,
|
data class KeysBackupSettingViewState(val keysBackupVersionTrust: Async<KeysBackupVersionTrust> = Uninitialized,
|
||||||
val keysBackupState: KeysBackupState? = null,
|
val keysBackupState: KeysBackupState? = null,
|
||||||
val keysBackupVersion: KeysVersionResult? = null,
|
val keysBackupVersion: KeysVersionResult? = null,
|
||||||
val deleteBackupRequest: Async<Unit> = Uninitialized)
|
val deleteBackupRequest: Async<Unit> = Uninitialized) :
|
||||||
: MvRxState
|
MvRxState
|
||||||
|
@ -31,8 +31,8 @@ import im.vector.app.features.crypto.keysbackup.restore.KeysBackupRestoreActivit
|
|||||||
import im.vector.app.features.crypto.keysbackup.setup.KeysBackupSetupActivity
|
import im.vector.app.features.crypto.keysbackup.setup.KeysBackupSetupActivity
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class KeysBackupSettingsFragment @Inject constructor(private val keysBackupSettingsRecyclerViewController: KeysBackupSettingsRecyclerViewController)
|
class KeysBackupSettingsFragment @Inject constructor(private val keysBackupSettingsRecyclerViewController: KeysBackupSettingsRecyclerViewController) :
|
||||||
: VectorBaseFragment<FragmentKeysBackupSettingsBinding>(),
|
VectorBaseFragment<FragmentKeysBackupSettingsBinding>(),
|
||||||
KeysBackupSettingsRecyclerViewController.Listener {
|
KeysBackupSettingsRecyclerViewController.Listener {
|
||||||
|
|
||||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentKeysBackupSettingsBinding {
|
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentKeysBackupSettingsBinding {
|
||||||
|
@ -67,8 +67,8 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
|
|||||||
@Assisted initialState: SharedSecureStorageViewState,
|
@Assisted initialState: SharedSecureStorageViewState,
|
||||||
@Assisted val args: SharedSecureStorageActivity.Args,
|
@Assisted val args: SharedSecureStorageActivity.Args,
|
||||||
private val stringProvider: StringProvider,
|
private val stringProvider: StringProvider,
|
||||||
private val session: Session)
|
private val session: Session) :
|
||||||
: VectorViewModel<SharedSecureStorageViewState, SharedSecureStorageAction, SharedSecureStorageViewEvent>(initialState) {
|
VectorViewModel<SharedSecureStorageViewState, SharedSecureStorageAction, SharedSecureStorageViewEvent>(initialState) {
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
interface Factory {
|
interface Factory {
|
||||||
|
@ -29,8 +29,8 @@ import im.vector.app.databinding.FragmentSsssResetAllBinding
|
|||||||
import im.vector.app.features.roommemberprofile.devices.DeviceListBottomSheet
|
import im.vector.app.features.roommemberprofile.devices.DeviceListBottomSheet
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class SharedSecuredStorageResetAllFragment @Inject constructor()
|
class SharedSecuredStorageResetAllFragment @Inject constructor() :
|
||||||
: VectorBaseFragment<FragmentSsssResetAllBinding>() {
|
VectorBaseFragment<FragmentSsssResetAllBinding>() {
|
||||||
|
|
||||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentSsssResetAllBinding {
|
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentSsssResetAllBinding {
|
||||||
return FragmentSsssResetAllBinding.inflate(inflater, container, false)
|
return FragmentSsssResetAllBinding.inflate(inflater, container, false)
|
||||||
|
@ -34,8 +34,8 @@ import io.reactivex.android.schedulers.AndroidSchedulers
|
|||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class BootstrapConfirmPassphraseFragment @Inject constructor()
|
class BootstrapConfirmPassphraseFragment @Inject constructor() :
|
||||||
: VectorBaseFragment<FragmentBootstrapEnterPassphraseBinding>() {
|
VectorBaseFragment<FragmentBootstrapEnterPassphraseBinding>() {
|
||||||
|
|
||||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentBootstrapEnterPassphraseBinding {
|
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentBootstrapEnterPassphraseBinding {
|
||||||
return FragmentBootstrapEnterPassphraseBinding.inflate(inflater, container, false)
|
return FragmentBootstrapEnterPassphraseBinding.inflate(inflater, container, false)
|
||||||
|
@ -33,8 +33,8 @@ import io.reactivex.android.schedulers.AndroidSchedulers
|
|||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class BootstrapEnterPassphraseFragment @Inject constructor()
|
class BootstrapEnterPassphraseFragment @Inject constructor() :
|
||||||
: VectorBaseFragment<FragmentBootstrapEnterPassphraseBinding>() {
|
VectorBaseFragment<FragmentBootstrapEnterPassphraseBinding>() {
|
||||||
|
|
||||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentBootstrapEnterPassphraseBinding {
|
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentBootstrapEnterPassphraseBinding {
|
||||||
return FragmentBootstrapEnterPassphraseBinding.inflate(inflater, container, false)
|
return FragmentBootstrapEnterPassphraseBinding.inflate(inflater, container, false)
|
||||||
|
@ -28,8 +28,8 @@ import im.vector.app.core.platform.VectorBaseFragment
|
|||||||
import im.vector.app.databinding.FragmentBootstrapSetupRecoveryBinding
|
import im.vector.app.databinding.FragmentBootstrapSetupRecoveryBinding
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class BootstrapSetupRecoveryKeyFragment @Inject constructor()
|
class BootstrapSetupRecoveryKeyFragment @Inject constructor() :
|
||||||
: VectorBaseFragment<FragmentBootstrapSetupRecoveryBinding>() {
|
VectorBaseFragment<FragmentBootstrapSetupRecoveryBinding>() {
|
||||||
|
|
||||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentBootstrapSetupRecoveryBinding {
|
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentBootstrapSetupRecoveryBinding {
|
||||||
return FragmentBootstrapSetupRecoveryBinding.inflate(inflater, container, false)
|
return FragmentBootstrapSetupRecoveryBinding.inflate(inflater, container, false)
|
||||||
|
@ -25,8 +25,8 @@ import im.vector.app.core.platform.VectorBaseFragment
|
|||||||
import im.vector.app.databinding.FragmentBootstrapWaitingBinding
|
import im.vector.app.databinding.FragmentBootstrapWaitingBinding
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class BootstrapWaitingFragment @Inject constructor()
|
class BootstrapWaitingFragment @Inject constructor() :
|
||||||
: VectorBaseFragment<FragmentBootstrapWaitingBinding>() {
|
VectorBaseFragment<FragmentBootstrapWaitingBinding>() {
|
||||||
|
|
||||||
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentBootstrapWaitingBinding {
|
override fun getBinding(inflater: LayoutInflater, container: ViewGroup?): FragmentBootstrapWaitingBinding {
|
||||||
return FragmentBootstrapWaitingBinding.inflate(inflater, container, false)
|
return FragmentBootstrapWaitingBinding.inflate(inflater, container, false)
|
||||||
|
@ -86,8 +86,8 @@ class VerificationBottomSheetViewModel @AssistedInject constructor(
|
|||||||
@Assisted val args: VerificationBottomSheet.VerificationArgs,
|
@Assisted val args: VerificationBottomSheet.VerificationArgs,
|
||||||
private val session: Session,
|
private val session: Session,
|
||||||
private val supportedVerificationMethodsProvider: SupportedVerificationMethodsProvider,
|
private val supportedVerificationMethodsProvider: SupportedVerificationMethodsProvider,
|
||||||
private val stringProvider: StringProvider)
|
private val stringProvider: StringProvider) :
|
||||||
: VectorViewModel<VerificationBottomSheetViewState, VerificationAction, VerificationBottomSheetViewEvents>(initialState),
|
VectorViewModel<VerificationBottomSheetViewState, VerificationAction, VerificationBottomSheetViewEvents>(initialState),
|
||||||
VerificationService.Listener {
|
VerificationService.Listener {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
|
@ -35,8 +35,8 @@ enum class ConclusionState {
|
|||||||
CANCELLED
|
CANCELLED
|
||||||
}
|
}
|
||||||
|
|
||||||
class VerificationConclusionViewModel(initialState: VerificationConclusionViewState)
|
class VerificationConclusionViewModel(initialState: VerificationConclusionViewState) :
|
||||||
: VectorViewModel<VerificationConclusionViewState, EmptyAction, EmptyViewEvents>(initialState) {
|
VectorViewModel<VerificationConclusionViewState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||||
|
|
||||||
companion object : MvRxViewModelFactory<VerificationConclusionViewModel, VerificationConclusionViewState> {
|
companion object : MvRxViewModelFactory<VerificationConclusionViewModel, VerificationConclusionViewState> {
|
||||||
|
|
||||||
|
@ -28,8 +28,8 @@ import im.vector.app.core.platform.VectorBaseFragment
|
|||||||
import im.vector.app.databinding.FragmentDevtoolsEditorBinding
|
import im.vector.app.databinding.FragmentDevtoolsEditorBinding
|
||||||
import javax.inject.Inject
|
import javax.inject.Inject
|
||||||
|
|
||||||
class RoomDevToolEditFragment @Inject constructor()
|
class RoomDevToolEditFragment @Inject constructor() :
|
||||||
: VectorBaseFragment<FragmentDevtoolsEditorBinding>() {
|
VectorBaseFragment<FragmentDevtoolsEditorBinding>() {
|
||||||
|
|
||||||
private val sharedViewModel: RoomDevToolViewModel by activityViewModel()
|
private val sharedViewModel: RoomDevToolViewModel by activityViewModel()
|
||||||
|
|
||||||
|
@ -39,8 +39,8 @@ import org.matrix.android.sdk.rx.rx
|
|||||||
|
|
||||||
class DiscoverySettingsViewModel @AssistedInject constructor(
|
class DiscoverySettingsViewModel @AssistedInject constructor(
|
||||||
@Assisted initialState: DiscoverySettingsState,
|
@Assisted initialState: DiscoverySettingsState,
|
||||||
private val session: Session)
|
private val session: Session) :
|
||||||
: VectorViewModel<DiscoverySettingsState, DiscoverySettingsAction, DiscoverySettingsViewEvents>(initialState) {
|
VectorViewModel<DiscoverySettingsState, DiscoverySettingsAction, DiscoverySettingsViewEvents>(initialState) {
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
interface Factory {
|
interface Factory {
|
||||||
|
@ -38,8 +38,8 @@ import java.net.UnknownHostException
|
|||||||
class SetIdentityServerViewModel @AssistedInject constructor(
|
class SetIdentityServerViewModel @AssistedInject constructor(
|
||||||
@Assisted initialState: SetIdentityServerState,
|
@Assisted initialState: SetIdentityServerState,
|
||||||
private val mxSession: Session,
|
private val mxSession: Session,
|
||||||
stringProvider: StringProvider)
|
stringProvider: StringProvider) :
|
||||||
: VectorViewModel<SetIdentityServerState, SetIdentityServerAction, SetIdentityServerViewEvents>(initialState) {
|
VectorViewModel<SetIdentityServerState, SetIdentityServerAction, SetIdentityServerViewEvents>(initialState) {
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
interface Factory {
|
interface Factory {
|
||||||
|
@ -63,8 +63,8 @@ class HomeDetailViewModel @AssistedInject constructor(@Assisted initialState: Ho
|
|||||||
private val callManager: WebRtcCallManager,
|
private val callManager: WebRtcCallManager,
|
||||||
private val directRoomHelper: DirectRoomHelper,
|
private val directRoomHelper: DirectRoomHelper,
|
||||||
private val appStateHandler: AppStateHandler,
|
private val appStateHandler: AppStateHandler,
|
||||||
private val autoAcceptInvites: AutoAcceptInvites)
|
private val autoAcceptInvites: AutoAcceptInvites) :
|
||||||
: VectorViewModel<HomeDetailViewState, HomeDetailAction, HomeDetailViewEvents>(initialState),
|
VectorViewModel<HomeDetailViewState, HomeDetailAction, HomeDetailViewEvents>(initialState),
|
||||||
CallProtocolsChecker.Listener {
|
CallProtocolsChecker.Listener {
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
|
@ -58,8 +58,8 @@ data class DeviceDetectionInfo(
|
|||||||
|
|
||||||
class UnknownDeviceDetectorSharedViewModel @AssistedInject constructor(@Assisted initialState: UnknownDevicesState,
|
class UnknownDeviceDetectorSharedViewModel @AssistedInject constructor(@Assisted initialState: UnknownDevicesState,
|
||||||
session: Session,
|
session: Session,
|
||||||
private val vectorPreferences: VectorPreferences)
|
private val vectorPreferences: VectorPreferences) :
|
||||||
: VectorViewModel<UnknownDevicesState, UnknownDeviceDetectorSharedViewModel.Action, EmptyViewEvents>(initialState) {
|
VectorViewModel<UnknownDevicesState, UnknownDeviceDetectorSharedViewModel.Action, EmptyViewEvents>(initialState) {
|
||||||
|
|
||||||
sealed class Action : VectorViewModelAction {
|
sealed class Action : VectorViewModelAction {
|
||||||
data class IgnoreDevice(val deviceIds: List<String>) : Action()
|
data class IgnoreDevice(val deviceIds: List<String>) : Action()
|
||||||
|
@ -57,8 +57,8 @@ class UnreadMessagesSharedViewModel @AssistedInject constructor(@Assisted initia
|
|||||||
session: Session,
|
session: Session,
|
||||||
private val vectorPreferences: VectorPreferences,
|
private val vectorPreferences: VectorPreferences,
|
||||||
appStateHandler: AppStateHandler,
|
appStateHandler: AppStateHandler,
|
||||||
private val autoAcceptInvites: AutoAcceptInvites)
|
private val autoAcceptInvites: AutoAcceptInvites) :
|
||||||
: VectorViewModel<UnreadMessagesState, EmptyAction, EmptyViewEvents>(initialState) {
|
VectorViewModel<UnreadMessagesState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
interface Factory {
|
interface Factory {
|
||||||
|
@ -33,8 +33,8 @@ import org.matrix.android.sdk.api.session.room.roomSummaryQueryParams
|
|||||||
import org.matrix.android.sdk.rx.rx
|
import org.matrix.android.sdk.rx.rx
|
||||||
|
|
||||||
class BreadcrumbsViewModel @AssistedInject constructor(@Assisted initialState: BreadcrumbsViewState,
|
class BreadcrumbsViewModel @AssistedInject constructor(@Assisted initialState: BreadcrumbsViewState,
|
||||||
private val session: Session)
|
private val session: Session) :
|
||||||
: VectorViewModel<BreadcrumbsViewState, EmptyAction, EmptyViewEvents>(initialState) {
|
VectorViewModel<BreadcrumbsViewState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||||
|
|
||||||
@AssistedFactory
|
@AssistedFactory
|
||||||
interface Factory {
|
interface Factory {
|
||||||
|
@ -32,8 +32,8 @@ import im.vector.app.core.platform.SimpleTextWatcher
|
|||||||
import im.vector.app.features.html.PillImageSpan
|
import im.vector.app.features.html.PillImageSpan
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
|
|
||||||
class ComposerEditText @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = android.R.attr.editTextStyle)
|
class ComposerEditText @JvmOverloads constructor(context: Context, attrs: AttributeSet? = null, defStyleAttr: Int = android.R.attr.editTextStyle) :
|
||||||
: EmojiEditText(context, attrs, defStyleAttr) {
|
EmojiEditText(context, attrs, defStyleAttr) {
|
||||||
|
|
||||||
interface Callback {
|
interface Callback {
|
||||||
fun onRichContentSelected(contentUri: Uri): Boolean
|
fun onRichContentSelected(contentUri: Uri): Boolean
|
||||||
|
@ -30,8 +30,8 @@ import javax.inject.Inject
|
|||||||
*/
|
*/
|
||||||
class DisplayReadReceiptsController @Inject constructor(private val dateFormatter: VectorDateFormatter,
|
class DisplayReadReceiptsController @Inject constructor(private val dateFormatter: VectorDateFormatter,
|
||||||
private val session: Session,
|
private val session: Session,
|
||||||
private val avatarRender: AvatarRenderer)
|
private val avatarRender: AvatarRenderer) :
|
||||||
: TypedEpoxyController<List<ReadReceiptData>>() {
|
TypedEpoxyController<List<ReadReceiptData>>() {
|
||||||
|
|
||||||
var listener: Listener? = null
|
var listener: Listener? = null
|
||||||
|
|
||||||
|
@ -26,8 +26,8 @@ data class ViewEditHistoryViewState(
|
|||||||
val eventId: String,
|
val eventId: String,
|
||||||
val roomId: String,
|
val roomId: String,
|
||||||
val isOriginalAReply: Boolean = false,
|
val isOriginalAReply: Boolean = false,
|
||||||
val editList: Async<List<Event>> = Uninitialized)
|
val editList: Async<List<Event>> = Uninitialized) :
|
||||||
: MvRxState {
|
MvRxState {
|
||||||
|
|
||||||
constructor(args: TimelineEventFragmentArgs) : this(roomId = args.roomId, eventId = args.eventId)
|
constructor(args: TimelineEventFragmentArgs) : this(roomId = args.roomId, eventId = args.eventId)
|
||||||
}
|
}
|
||||||
|
@ -63,8 +63,7 @@ class MergedHeaderItemFactory @Inject constructor(private val activeSessionHolde
|
|||||||
currentPosition: Int,
|
currentPosition: Int,
|
||||||
eventIdToHighlight: String?,
|
eventIdToHighlight: String?,
|
||||||
callback: TimelineEventController.Callback?,
|
callback: TimelineEventController.Callback?,
|
||||||
requestModelBuild: () -> Unit)
|
requestModelBuild: () -> Unit): BasedMergedItem<*>? {
|
||||||
: BasedMergedItem<*>? {
|
|
||||||
return if (nextEvent?.root?.getClearType() == EventType.STATE_ROOM_CREATE &&
|
return if (nextEvent?.root?.getClearType() == EventType.STATE_ROOM_CREATE &&
|
||||||
event.isRoomConfiguration(nextEvent.root.getClearContent()?.toModel<RoomCreateContent>()?.creator)) {
|
event.isRoomConfiguration(nextEvent.root.getClearContent()?.toModel<RoomCreateContent>()?.creator)) {
|
||||||
// It's the first item before room.create
|
// It's the first item before room.create
|
||||||
|
@ -21,8 +21,8 @@ import im.vector.app.core.epoxy.VectorEpoxyModel
|
|||||||
import im.vector.app.features.home.room.detail.timeline.TimelineEventController
|
import im.vector.app.features.home.room.detail.timeline.TimelineEventController
|
||||||
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
|
import org.matrix.android.sdk.api.session.room.timeline.TimelineEvent
|
||||||
|
|
||||||
class ReadMarkerVisibilityStateChangedListener(private val callback: TimelineEventController.Callback?)
|
class ReadMarkerVisibilityStateChangedListener(private val callback: TimelineEventController.Callback?) :
|
||||||
: VectorEpoxyModel.OnVisibilityStateChangedListener {
|
VectorEpoxyModel.OnVisibilityStateChangedListener {
|
||||||
|
|
||||||
override fun onVisibilityStateChanged(visibilityState: Int) {
|
override fun onVisibilityStateChanged(visibilityState: Int) {
|
||||||
if (visibilityState == VisibilityState.VISIBLE) {
|
if (visibilityState == VisibilityState.VISIBLE) {
|
||||||
@ -32,8 +32,8 @@ class ReadMarkerVisibilityStateChangedListener(private val callback: TimelineEve
|
|||||||
}
|
}
|
||||||
|
|
||||||
class TimelineEventVisibilityStateChangedListener(private val callback: TimelineEventController.Callback?,
|
class TimelineEventVisibilityStateChangedListener(private val callback: TimelineEventController.Callback?,
|
||||||
private val event: TimelineEvent)
|
private val event: TimelineEvent) :
|
||||||
: VectorEpoxyModel.OnVisibilityStateChangedListener {
|
VectorEpoxyModel.OnVisibilityStateChangedListener {
|
||||||
|
|
||||||
override fun onVisibilityStateChanged(visibilityState: Int) {
|
override fun onVisibilityStateChanged(visibilityState: Int) {
|
||||||
if (visibilityState == VisibilityState.VISIBLE) {
|
if (visibilityState == VisibilityState.VISIBLE) {
|
||||||
@ -45,8 +45,8 @@ class TimelineEventVisibilityStateChangedListener(private val callback: Timeline
|
|||||||
}
|
}
|
||||||
|
|
||||||
class MergedTimelineEventVisibilityStateChangedListener(private val callback: TimelineEventController.Callback?,
|
class MergedTimelineEventVisibilityStateChangedListener(private val callback: TimelineEventController.Callback?,
|
||||||
private val events: List<TimelineEvent>)
|
private val events: List<TimelineEvent>) :
|
||||||
: VectorEpoxyModel.OnVisibilityStateChangedListener {
|
VectorEpoxyModel.OnVisibilityStateChangedListener {
|
||||||
|
|
||||||
override fun onVisibilityStateChanged(visibilityState: Int) {
|
override fun onVisibilityStateChanged(visibilityState: Int) {
|
||||||
if (visibilityState == VisibilityState.VISIBLE) {
|
if (visibilityState == VisibilityState.VISIBLE) {
|
||||||
|
@ -32,8 +32,8 @@ import javax.inject.Inject
|
|||||||
*/
|
*/
|
||||||
class ViewReactionsEpoxyController @Inject constructor(
|
class ViewReactionsEpoxyController @Inject constructor(
|
||||||
private val stringProvider: StringProvider,
|
private val stringProvider: StringProvider,
|
||||||
private val emojiCompatWrapper: EmojiCompatWrapper)
|
private val emojiCompatWrapper: EmojiCompatWrapper) :
|
||||||
: TypedEpoxyController<DisplayReactionsViewState>() {
|
TypedEpoxyController<DisplayReactionsViewState>() {
|
||||||
|
|
||||||
var listener: Listener? = null
|
var listener: Listener? = null
|
||||||
|
|
||||||
|
@ -41,8 +41,8 @@ import org.matrix.android.sdk.rx.unwrap
|
|||||||
data class DisplayReactionsViewState(
|
data class DisplayReactionsViewState(
|
||||||
val eventId: String,
|
val eventId: String,
|
||||||
val roomId: String,
|
val roomId: String,
|
||||||
val mapReactionKeyToMemberList: Async<List<ReactionInfo>> = Uninitialized)
|
val mapReactionKeyToMemberList: Async<List<ReactionInfo>> = Uninitialized) :
|
||||||
: MvRxState {
|
MvRxState {
|
||||||
|
|
||||||
constructor(args: TimelineEventFragmentArgs) : this(roomId = args.roomId, eventId = args.eventId)
|
constructor(args: TimelineEventFragmentArgs) : this(roomId = args.roomId, eventId = args.eventId)
|
||||||
}
|
}
|
||||||
|
@ -34,8 +34,8 @@ import org.matrix.android.sdk.api.session.Session
|
|||||||
class MigrateRoomViewModel @AssistedInject constructor(
|
class MigrateRoomViewModel @AssistedInject constructor(
|
||||||
@Assisted initialState: MigrateRoomViewState,
|
@Assisted initialState: MigrateRoomViewState,
|
||||||
private val session: Session,
|
private val session: Session,
|
||||||
private val upgradeRoomViewModelTask: UpgradeRoomViewModelTask)
|
private val upgradeRoomViewModelTask: UpgradeRoomViewModelTask) :
|
||||||
: VectorViewModel<MigrateRoomViewState, MigrateRoomAction, EmptyViewEvents>(initialState) {
|
VectorViewModel<MigrateRoomViewState, MigrateRoomAction, EmptyViewEvents>(initialState) {
|
||||||
|
|
||||||
init {
|
init {
|
||||||
val room = session.getRoom(initialState.roomId)
|
val room = session.getRoom(initialState.roomId)
|
||||||
|
@ -30,8 +30,8 @@ import javax.inject.Inject
|
|||||||
*/
|
*/
|
||||||
class RoomWidgetsController @Inject constructor(
|
class RoomWidgetsController @Inject constructor(
|
||||||
val stringProvider: StringProvider,
|
val stringProvider: StringProvider,
|
||||||
val colorProvider: ColorProvider)
|
val colorProvider: ColorProvider) :
|
||||||
: TypedEpoxyController<List<Widget>>() {
|
TypedEpoxyController<List<Widget>>() {
|
||||||
|
|
||||||
var listener: Listener? = null
|
var listener: Listener? = null
|
||||||
|
|
||||||
|
@ -18,8 +18,8 @@ package im.vector.app.features.home.room.list
|
|||||||
|
|
||||||
import com.airbnb.epoxy.EpoxyController
|
import com.airbnb.epoxy.EpoxyController
|
||||||
|
|
||||||
abstract class CollapsableTypedEpoxyController<T>
|
abstract class CollapsableTypedEpoxyController<T> :
|
||||||
: EpoxyController(), CollapsableControllerExtension {
|
EpoxyController(), CollapsableControllerExtension {
|
||||||
|
|
||||||
private var currentData: T? = null
|
private var currentData: T? = null
|
||||||
private var allowModelBuildRequests = false
|
private var allowModelBuildRequests = false
|
||||||
|
@ -28,8 +28,8 @@ class RoomListViewModelFactory @Inject constructor(private val session: Provider
|
|||||||
private val appStateHandler: AppStateHandler,
|
private val appStateHandler: AppStateHandler,
|
||||||
private val stringProvider: StringProvider,
|
private val stringProvider: StringProvider,
|
||||||
private val vectorPreferences: VectorPreferences,
|
private val vectorPreferences: VectorPreferences,
|
||||||
private val autoAcceptInvites: AutoAcceptInvites)
|
private val autoAcceptInvites: AutoAcceptInvites) :
|
||||||
: RoomListViewModel.Factory {
|
RoomListViewModel.Factory {
|
||||||
|
|
||||||
override fun create(initialState: RoomListViewState): RoomListViewModel {
|
override fun create(initialState: RoomListViewState): RoomListViewModel {
|
||||||
return RoomListViewModel(
|
return RoomListViewModel(
|
||||||
|
@ -24,8 +24,8 @@ import im.vector.app.core.platform.VectorSharedAction
|
|||||||
sealed class RoomListQuickActionsSharedAction(
|
sealed class RoomListQuickActionsSharedAction(
|
||||||
@StringRes val titleRes: Int,
|
@StringRes val titleRes: Int,
|
||||||
@DrawableRes val iconResId: Int?,
|
@DrawableRes val iconResId: Int?,
|
||||||
val destructive: Boolean = false)
|
val destructive: Boolean = false) :
|
||||||
: VectorSharedAction {
|
VectorSharedAction {
|
||||||
|
|
||||||
data class NotificationsAllNoisy(val roomId: String) : RoomListQuickActionsSharedAction(
|
data class NotificationsAllNoisy(val roomId: String) : RoomListQuickActionsSharedAction(
|
||||||
R.string.room_list_quick_actions_notifications_all_noisy,
|
R.string.room_list_quick_actions_notifications_all_noisy,
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user