mirror of
https://github.com/element-hq/element-android
synced 2024-11-23 09:55:40 +03:00
Dagger: update to 2.31 and use new AssistedInject
This commit is contained in:
parent
72ee1ace48
commit
2c0b7ce0f4
93 changed files with 351 additions and 346 deletions
|
@ -23,7 +23,7 @@ Test:
|
|||
-
|
||||
|
||||
Other changes:
|
||||
-
|
||||
- Update Dagger to 2.31 version so we can use the embedded AssistedInject feature
|
||||
|
||||
Changes in Element 1.0.14 (2020-01-15)
|
||||
===================================================
|
||||
|
|
3
gradle/wrapper/gradle-wrapper.properties
vendored
3
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,7 @@
|
|||
#Fri Jan 15 11:30:47 CET 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionSha256Sum=a7ca23b3ccf265680f2bfd35f1f00b1424f4466292c7337c85d46c9641b3f053
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.8-all.zip
|
||||
|
|
|
@ -112,7 +112,7 @@ dependencies {
|
|||
def lifecycle_version = '2.2.0'
|
||||
def arch_version = '2.1.0'
|
||||
def markwon_version = '3.1.0'
|
||||
def daggerVersion = '2.29.1'
|
||||
def daggerVersion = '2.31'
|
||||
def work_version = '2.4.0'
|
||||
def retrofit_version = '2.6.2'
|
||||
|
||||
|
@ -160,8 +160,6 @@ dependencies {
|
|||
// DI
|
||||
implementation "com.google.dagger:dagger:$daggerVersion"
|
||||
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
|
||||
compileOnly 'com.squareup.inject:assisted-inject-annotations-dagger2:0.5.0'
|
||||
kapt 'com.squareup.inject:assisted-inject-processor-dagger2:0.5.0'
|
||||
|
||||
// Logging
|
||||
implementation 'com.jakewharton.timber:timber:4.7.1'
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright 2020 The Matrix.org Foundation C.I.C.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.matrix.android.sdk.internal.di
|
||||
|
||||
import com.squareup.inject.assisted.dagger2.AssistedModule
|
||||
import dagger.Module
|
||||
|
||||
@AssistedModule
|
||||
@Module(includes = [AssistedInject_SessionAssistedInjectModule::class])
|
||||
interface SessionAssistedInjectModule
|
|
@ -27,7 +27,6 @@ import org.matrix.android.sdk.internal.crypto.SendGossipWorker
|
|||
import org.matrix.android.sdk.internal.crypto.crosssigning.UpdateTrustWorker
|
||||
import org.matrix.android.sdk.internal.crypto.verification.SendVerificationMessageWorker
|
||||
import org.matrix.android.sdk.internal.di.MatrixComponent
|
||||
import org.matrix.android.sdk.internal.di.SessionAssistedInjectModule
|
||||
import org.matrix.android.sdk.internal.network.NetworkConnectivityChecker
|
||||
import org.matrix.android.sdk.internal.session.account.AccountModule
|
||||
import org.matrix.android.sdk.internal.session.cache.CacheModule
|
||||
|
@ -86,7 +85,6 @@ import org.matrix.android.sdk.internal.util.MatrixCoroutineDispatchers
|
|||
TermsModule::class,
|
||||
AccountDataModule::class,
|
||||
ProfileModule::class,
|
||||
SessionAssistedInjectModule::class,
|
||||
AccountModule::class,
|
||||
CallModule::class,
|
||||
SearchModule::class
|
||||
|
|
|
@ -16,8 +16,9 @@
|
|||
|
||||
package org.matrix.android.sdk.internal.session.room.alias
|
||||
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import org.matrix.android.sdk.api.session.room.alias.AliasService
|
||||
|
||||
internal class DefaultAliasService @AssistedInject constructor(
|
||||
|
@ -26,9 +27,9 @@ internal class DefaultAliasService @AssistedInject constructor(
|
|||
private val addRoomAliasTask: AddRoomAliasTask
|
||||
) : AliasService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): AliasService
|
||||
fun create(roomId: String): DefaultAliasService
|
||||
}
|
||||
|
||||
override suspend fun getRoomAliases(): List<String> {
|
||||
|
|
|
@ -16,8 +16,9 @@
|
|||
|
||||
package org.matrix.android.sdk.internal.session.room.call
|
||||
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import org.matrix.android.sdk.api.extensions.orFalse
|
||||
import org.matrix.android.sdk.api.session.room.call.RoomCallService
|
||||
import org.matrix.android.sdk.internal.session.room.RoomGetter
|
||||
|
@ -27,9 +28,9 @@ internal class DefaultRoomCallService @AssistedInject constructor(
|
|||
private val roomGetter: RoomGetter
|
||||
) : RoomCallService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): RoomCallService
|
||||
fun create(roomId: String): DefaultRoomCallService
|
||||
}
|
||||
|
||||
override fun canStartCall(): Boolean {
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
package org.matrix.android.sdk.internal.session.room.draft
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import kotlinx.coroutines.withContext
|
||||
import org.matrix.android.sdk.api.session.room.send.DraftService
|
||||
import org.matrix.android.sdk.api.session.room.send.UserDraft
|
||||
|
@ -30,9 +31,9 @@ internal class DefaultDraftService @AssistedInject constructor(@Assisted private
|
|||
private val coroutineDispatchers: MatrixCoroutineDispatchers
|
||||
) : DraftService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): DraftService
|
||||
fun create(roomId: String): DefaultDraftService
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
package org.matrix.android.sdk.internal.session.room.membership
|
||||
|
||||
import androidx.lifecycle.LiveData
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import com.zhuinden.monarchy.Monarchy
|
||||
import org.matrix.android.sdk.api.MatrixCallback
|
||||
import org.matrix.android.sdk.api.session.identity.ThreePid
|
||||
|
@ -58,9 +59,9 @@ internal class DefaultMembershipService @AssistedInject constructor(
|
|||
private val userId: String
|
||||
) : MembershipService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): MembershipService
|
||||
fun create(roomId: String): DefaultMembershipService
|
||||
}
|
||||
|
||||
override fun loadRoomMembersIfNeeded(matrixCallback: MatrixCallback<Unit>): Cancelable {
|
||||
|
|
|
@ -18,8 +18,9 @@ package org.matrix.android.sdk.internal.session.room.notification
|
|||
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import com.zhuinden.monarchy.Monarchy
|
||||
import org.matrix.android.sdk.api.pushrules.RuleScope
|
||||
import org.matrix.android.sdk.api.session.room.notification.RoomNotificationState
|
||||
|
@ -33,9 +34,9 @@ internal class DefaultRoomPushRuleService @AssistedInject constructor(@Assisted
|
|||
@SessionDatabase private val monarchy: Monarchy)
|
||||
: RoomPushRuleService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): RoomPushRuleService
|
||||
fun create(roomId: String): DefaultRoomPushRuleService
|
||||
}
|
||||
|
||||
override fun getLiveRoomNotificationState(): LiveData<RoomNotificationState> {
|
||||
|
|
|
@ -18,8 +18,9 @@ package org.matrix.android.sdk.internal.session.room.read
|
|||
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import com.zhuinden.monarchy.Monarchy
|
||||
import org.matrix.android.sdk.api.MatrixCallback
|
||||
import org.matrix.android.sdk.api.session.room.model.ReadReceipt
|
||||
|
@ -46,9 +47,9 @@ internal class DefaultReadService @AssistedInject constructor(
|
|||
@UserId private val userId: String
|
||||
) : ReadService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): ReadService
|
||||
fun create(roomId: String): DefaultReadService
|
||||
}
|
||||
|
||||
override fun markAsRead(params: ReadService.MarkAsReadParams, callback: MatrixCallback<Unit>) {
|
||||
|
|
|
@ -17,8 +17,9 @@ package org.matrix.android.sdk.internal.session.room.relation
|
|||
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import com.zhuinden.monarchy.Monarchy
|
||||
import org.matrix.android.sdk.api.MatrixCallback
|
||||
import org.matrix.android.sdk.api.session.events.model.Event
|
||||
|
@ -56,9 +57,9 @@ internal class DefaultRelationService @AssistedInject constructor(
|
|||
private val taskExecutor: TaskExecutor)
|
||||
: RelationService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): RelationService
|
||||
fun create(roomId: String): DefaultRelationService
|
||||
}
|
||||
|
||||
override fun sendReaction(targetEventId: String, reaction: String): Cancelable {
|
||||
|
|
|
@ -16,17 +16,18 @@
|
|||
|
||||
package org.matrix.android.sdk.internal.session.room.reporting
|
||||
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import org.matrix.android.sdk.api.session.room.reporting.ReportingService
|
||||
|
||||
internal class DefaultReportingService @AssistedInject constructor(@Assisted private val roomId: String,
|
||||
private val reportContentTask: ReportContentTask
|
||||
) : ReportingService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): ReportingService
|
||||
fun create(roomId: String): DefaultReportingService
|
||||
}
|
||||
|
||||
override suspend fun reportContent(eventId: String, score: Int, reason: String) {
|
||||
|
|
|
@ -21,8 +21,9 @@ import androidx.work.BackoffPolicy
|
|||
import androidx.work.ExistingWorkPolicy
|
||||
import androidx.work.OneTimeWorkRequest
|
||||
import androidx.work.Operation
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import kotlinx.coroutines.launch
|
||||
import org.matrix.android.sdk.api.session.content.ContentAttachmentData
|
||||
import org.matrix.android.sdk.api.session.events.model.Event
|
||||
|
@ -71,9 +72,9 @@ internal class DefaultSendService @AssistedInject constructor(
|
|||
private val cancelSendTracker: CancelSendTracker
|
||||
) : SendService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): SendService
|
||||
fun create(roomId: String): DefaultSendService
|
||||
}
|
||||
|
||||
private val workerFutureListenerExecutor = Executors.newSingleThreadExecutor()
|
||||
|
|
|
@ -18,8 +18,9 @@ package org.matrix.android.sdk.internal.session.room.state
|
|||
|
||||
import android.net.Uri
|
||||
import androidx.lifecycle.LiveData
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import org.matrix.android.sdk.api.query.QueryStringValue
|
||||
import org.matrix.android.sdk.api.session.events.model.Event
|
||||
import org.matrix.android.sdk.api.session.events.model.EventType
|
||||
|
@ -42,9 +43,9 @@ internal class DefaultStateService @AssistedInject constructor(@Assisted private
|
|||
private val fileUploader: FileUploader
|
||||
) : StateService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): StateService
|
||||
fun create(roomId: String): DefaultStateService
|
||||
}
|
||||
|
||||
override fun getStateEvent(eventType: String, stateKey: QueryStringValue): Event? {
|
||||
|
|
|
@ -16,8 +16,9 @@
|
|||
|
||||
package org.matrix.android.sdk.internal.session.room.tags
|
||||
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import org.matrix.android.sdk.api.session.room.tags.TagsService
|
||||
|
||||
internal class DefaultTagsService @AssistedInject constructor(
|
||||
|
@ -26,9 +27,9 @@ internal class DefaultTagsService @AssistedInject constructor(
|
|||
private val deleteTagFromRoomTask: DeleteTagFromRoomTask
|
||||
) : TagsService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): TagsService
|
||||
fun create(roomId: String): DefaultTagsService
|
||||
}
|
||||
|
||||
override suspend fun addTag(tag: String, order: Double?) {
|
||||
|
|
|
@ -18,8 +18,9 @@ package org.matrix.android.sdk.internal.session.room.timeline
|
|||
|
||||
import androidx.lifecycle.LiveData
|
||||
import androidx.lifecycle.Transformations
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import com.zhuinden.monarchy.Monarchy
|
||||
import io.realm.Sort
|
||||
import io.realm.kotlin.where
|
||||
|
@ -55,9 +56,9 @@ internal class DefaultTimelineService @AssistedInject constructor(@Assisted priv
|
|||
private val loadRoomMembersTask: LoadRoomMembersTask
|
||||
) : TimelineService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): TimelineService
|
||||
fun create(roomId: String): DefaultTimelineService
|
||||
}
|
||||
|
||||
override fun createTimeline(eventId: String?, settings: TimelineSettings): Timeline {
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
package org.matrix.android.sdk.internal.session.room.typing
|
||||
|
||||
import android.os.SystemClock
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import org.matrix.android.sdk.api.MatrixCallback
|
||||
import org.matrix.android.sdk.api.session.room.typing.TypingService
|
||||
import org.matrix.android.sdk.api.util.Cancelable
|
||||
|
@ -38,9 +39,9 @@ internal class DefaultTypingService @AssistedInject constructor(
|
|||
private val sendTypingTask: SendTypingTask
|
||||
) : TypingService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): TypingService
|
||||
fun create(roomId: String): DefaultTypingService
|
||||
}
|
||||
|
||||
private var currentTask: Cancelable? = null
|
||||
|
|
|
@ -16,8 +16,9 @@
|
|||
|
||||
package org.matrix.android.sdk.internal.session.room.uploads
|
||||
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import org.matrix.android.sdk.api.session.crypto.CryptoService
|
||||
import org.matrix.android.sdk.api.session.room.uploads.GetUploadsResult
|
||||
import org.matrix.android.sdk.api.session.room.uploads.UploadsService
|
||||
|
@ -28,9 +29,9 @@ internal class DefaultUploadsService @AssistedInject constructor(
|
|||
private val cryptoService: CryptoService
|
||||
) : UploadsService {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): UploadsService
|
||||
fun create(roomId: String): DefaultUploadsService
|
||||
}
|
||||
|
||||
override suspend fun getUploads(numberOfEvents: Int, since: String?): GetUploadsResult {
|
||||
|
|
|
@ -4,8 +4,9 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
||||
|
@ -21,7 +22,7 @@ class ${viewModelClass} @AssistedInject constructor(@Assisted initialState: ${vi
|
|||
: VectorViewModel<${viewStateClass}, ${actionClass}, EmptyViewEvents>(initialState) {
|
||||
</#if>
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: ${viewStateClass}): ${viewModelClass}
|
||||
}
|
||||
|
|
|
@ -291,7 +291,7 @@ dependencies {
|
|||
def big_image_viewer_version = '1.6.2'
|
||||
def glide_version = '4.11.0'
|
||||
def moshi_version = '1.11.0'
|
||||
def daggerVersion = '2.29.1'
|
||||
def daggerVersion = '2.31'
|
||||
def autofill_version = "1.0.0"
|
||||
def work_version = '2.4.0'
|
||||
def arch_version = '2.1.0'
|
||||
|
@ -412,8 +412,6 @@ dependencies {
|
|||
// DI
|
||||
implementation "com.google.dagger:dagger:$daggerVersion"
|
||||
kapt "com.google.dagger:dagger-compiler:$daggerVersion"
|
||||
compileOnly 'com.squareup.inject:assisted-inject-annotations-dagger2:0.5.0'
|
||||
kapt 'com.squareup.inject:assisted-inject-processor-dagger2:0.5.0'
|
||||
|
||||
// gplay flavor only
|
||||
gplayImplementation('com.google.firebase:firebase-messaging:21.0.0') {
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package im.vector.app.core.di
|
||||
|
||||
import com.squareup.inject.assisted.dagger2.AssistedModule
|
||||
import dagger.Module
|
||||
|
||||
@AssistedModule
|
||||
@Module(includes = [AssistedInject_AssistedInjectModule::class])
|
||||
interface AssistedInjectModule
|
|
@ -86,7 +86,6 @@ import im.vector.app.features.workers.signout.SignOutBottomSheetDialogFragment
|
|||
VectorComponent::class
|
||||
],
|
||||
modules = [
|
||||
AssistedInjectModule::class,
|
||||
ViewModelModule::class,
|
||||
FragmentModule::class,
|
||||
HomeModule::class,
|
||||
|
|
|
@ -1,22 +0,0 @@
|
|||
/*
|
||||
* Copyright 2019 New Vector Ltd
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package im.vector.app.core.di
|
||||
|
||||
/*
|
||||
@Module(includes = [AssistedInject_VectorAssistedModule::class])
|
||||
@AssistedModule
|
||||
class VectorAssistedModule*/
|
|
@ -18,8 +18,9 @@ package im.vector.app.features.autocomplete.member
|
|||
|
||||
import android.content.Context
|
||||
import androidx.recyclerview.widget.RecyclerView
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.features.autocomplete.AutocompleteClickListener
|
||||
import im.vector.app.features.autocomplete.RecyclerViewPresenter
|
||||
import org.matrix.android.sdk.api.query.QueryStringValue
|
||||
|
@ -44,7 +45,7 @@ class AutocompleteMemberPresenter @AssistedInject constructor(context: Context,
|
|||
controller.listener = null
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): AutocompleteMemberPresenter
|
||||
}
|
||||
|
|
|
@ -22,8 +22,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import org.matrix.android.sdk.api.MatrixCallback
|
||||
|
@ -242,7 +243,7 @@ class VectorCallViewModel @AssistedInject constructor(
|
|||
}.exhaustive
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: VectorCallViewState, args: CallArgs): VectorCallViewModel
|
||||
}
|
||||
|
|
|
@ -21,8 +21,9 @@ import com.airbnb.mvrx.Fail
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import org.jitsi.meet.sdk.JitsiMeetUserInfo
|
||||
|
@ -40,7 +41,7 @@ class JitsiCallViewModel @AssistedInject constructor(
|
|||
private val stringProvider: StringProvider
|
||||
) : VectorViewModel<JitsiCallViewState, JitsiCallViewActions, JitsiCallViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: JitsiCallViewState, args: VectorJitsiActivity.Args): JitsiCallViewModel
|
||||
}
|
||||
|
|
|
@ -21,7 +21,6 @@ import android.os.Build
|
|||
import android.telecom.Connection
|
||||
import android.telecom.DisconnectCause
|
||||
import androidx.annotation.RequiresApi
|
||||
import im.vector.app.features.call.VectorCallViewModel
|
||||
import im.vector.app.features.call.WebRtcPeerConnectionManager
|
||||
import timber.log.Timber
|
||||
import javax.inject.Inject
|
||||
|
@ -33,7 +32,6 @@ import javax.inject.Inject
|
|||
) : Connection() {
|
||||
|
||||
@Inject lateinit var peerConnectionManager: WebRtcPeerConnectionManager
|
||||
@Inject lateinit var callViewModel: VectorCallViewModel
|
||||
|
||||
init {
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||
|
|
|
@ -24,8 +24,9 @@ import com.airbnb.mvrx.Loading
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.contacts.ContactsDataSource
|
||||
import im.vector.app.core.contacts.MappedContact
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
|
@ -48,7 +49,7 @@ class ContactsBookViewModel @AssistedInject constructor(@Assisted
|
|||
private val session: Session)
|
||||
: VectorViewModel<ContactsBookViewState, ContactsBookAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: ContactsBookViewState): ContactsBookViewModel
|
||||
}
|
||||
|
|
|
@ -21,8 +21,9 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.features.raw.wellknown.getElementWellknown
|
||||
|
@ -41,7 +42,7 @@ class CreateDirectRoomViewModel @AssistedInject constructor(@Assisted
|
|||
val session: Session)
|
||||
: VectorViewModel<CreateDirectRoomViewState, CreateDirectRoomAction, CreateDirectRoomViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: CreateDirectRoomViewState): CreateDirectRoomViewModel
|
||||
}
|
||||
|
|
|
@ -22,8 +22,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import org.matrix.android.sdk.api.MatrixCallback
|
||||
|
@ -39,7 +40,7 @@ class KeysBackupSettingsViewModel @AssistedInject constructor(@Assisted initialS
|
|||
) : VectorViewModel<KeysBackupSettingViewState, KeyBackupSettingsAction, EmptyViewEvents>(initialState),
|
||||
KeysBackupStateListener {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: KeysBackupSettingViewState): KeysBackupSettingsViewModel
|
||||
}
|
||||
|
|
|
@ -26,8 +26,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -71,7 +72,7 @@ class SharedSecureStorageViewModel @AssistedInject constructor(
|
|||
private val session: Session)
|
||||
: VectorViewModel<SharedSecureStorageViewState, SharedSecureStorageAction, SharedSecureStorageViewEvent>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: SharedSecureStorageViewState, args: SharedSecureStorageActivity.Args): SharedSecureStorageViewModel
|
||||
}
|
||||
|
|
|
@ -25,8 +25,9 @@ import com.airbnb.mvrx.Success
|
|||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.nulabinc.zxcvbn.Zxcvbn
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.error.ErrorFormatter
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
|
@ -60,7 +61,7 @@ class BootstrapSharedViewModel @AssistedInject constructor(
|
|||
private var isBackupCreatedFromPassphrase: Boolean = false
|
||||
private val zxcvbn = Zxcvbn()
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: BootstrapViewState, args: BootstrapBottomSheet.Args): BootstrapSharedViewModel
|
||||
}
|
||||
|
|
|
@ -25,8 +25,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -159,7 +160,7 @@ class VerificationBottomSheetViewModel @AssistedInject constructor(
|
|||
super.onCleared()
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: VerificationBottomSheetViewState,
|
||||
args: VerificationBottomSheet.VerificationArgs): VerificationBottomSheetViewModel
|
||||
|
|
|
@ -19,8 +19,9 @@ import com.airbnb.mvrx.FragmentViewModelContext
|
|||
import com.airbnb.mvrx.MvRxState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.di.HasScreenInjector
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
|
@ -79,7 +80,7 @@ class VerificationChooseMethodViewModel @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: VerificationChooseMethodViewState): VerificationChooseMethodViewModel
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.di.HasScreenInjector
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
|
@ -149,7 +150,7 @@ class VerificationEmojiCodeViewModel @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: VerificationEmojiCodeViewState): VerificationEmojiCodeViewModel
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -42,7 +43,7 @@ class DiscoverySettingsViewModel @AssistedInject constructor(
|
|||
private val session: Session)
|
||||
: VectorViewModel<DiscoverySettingsState, DiscoverySettingsAction, DiscoverySettingsViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: DiscoverySettingsState): DiscoverySettingsViewModel
|
||||
}
|
||||
|
|
|
@ -19,8 +19,9 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.HasScreenInjector
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
|
@ -41,7 +42,7 @@ class SetIdentityServerViewModel @AssistedInject constructor(
|
|||
stringProvider: StringProvider)
|
||||
: VectorViewModel<SetIdentityServerState, SetIdentityServerAction, SetIdentityServerViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: SetIdentityServerState): SetIdentityServerViewModel
|
||||
}
|
||||
|
|
|
@ -22,8 +22,9 @@ import arrow.core.Option
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
|
@ -45,7 +46,7 @@ class GroupListViewModel @AssistedInject constructor(@Assisted initialState: Gro
|
|||
private val stringProvider: StringProvider
|
||||
) : VectorViewModel<GroupListViewState, GroupListAction, GroupListViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: GroupListViewState): GroupListViewModel
|
||||
}
|
||||
|
|
|
@ -20,8 +20,9 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.MvRx
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -52,7 +53,7 @@ class HomeActivityViewModel @AssistedInject constructor(
|
|||
private val vectorPreferences: VectorPreferences
|
||||
) : VectorViewModel<HomeActivityViewState, HomeActivityViewActions, HomeActivityViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: HomeActivityViewState, args: HomeActivityArgs): HomeActivityViewModel
|
||||
}
|
||||
|
|
|
@ -19,8 +19,9 @@ package im.vector.app.features.home
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.di.HasScreenInjector
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -44,7 +45,7 @@ class HomeDetailViewModel @AssistedInject constructor(@Assisted initialState: Ho
|
|||
private val stringProvider: StringProvider)
|
||||
: VectorViewModel<HomeDetailViewState, HomeDetailAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: HomeDetailViewState): HomeDetailViewModel
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.core.platform.VectorViewModelAction
|
||||
|
@ -65,7 +66,7 @@ class UnknownDeviceDetectorSharedViewModel @AssistedInject constructor(@Assisted
|
|||
data class IgnoreDevice(val deviceIds: List<String>) : Action()
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: UnknownDevicesState): UnknownDeviceDetectorSharedViewModel
|
||||
}
|
||||
|
|
|
@ -19,8 +19,9 @@ package im.vector.app.features.home.room.breadcrumbs
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -35,7 +36,7 @@ class BreadcrumbsViewModel @AssistedInject constructor(@Assisted initialState: B
|
|||
private val session: Session)
|
||||
: VectorViewModel<BreadcrumbsViewState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: BreadcrumbsViewState): BreadcrumbsViewModel
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ import android.widget.EditText
|
|||
import com.otaliastudios.autocomplete.Autocomplete
|
||||
import com.otaliastudios.autocomplete.AutocompleteCallback
|
||||
import com.otaliastudios.autocomplete.CharPolicy
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.glide.GlideApp
|
||||
import im.vector.app.core.glide.GlideRequests
|
||||
|
@ -59,7 +60,7 @@ class AutoCompleter @AssistedInject constructor(
|
|||
|
||||
private lateinit var autocompleteMemberPresenter: AutocompleteMemberPresenter
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): AutoCompleter
|
||||
}
|
||||
|
|
|
@ -25,8 +25,9 @@ import com.airbnb.mvrx.Success
|
|||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.jakewharton.rxrelay2.BehaviorRelay
|
||||
import com.jakewharton.rxrelay2.PublishRelay
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -134,7 +135,7 @@ class RoomDetailViewModel @AssistedInject constructor(
|
|||
private var trackUnreadMessages = AtomicBoolean(false)
|
||||
private var mostRecentDisplayedEvent: TimelineEvent? = null
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomDetailViewState): RoomDetailViewModel
|
||||
}
|
||||
|
|
|
@ -23,8 +23,9 @@ import com.airbnb.mvrx.Loading
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -46,7 +47,7 @@ class SearchViewModel @AssistedInject constructor(
|
|||
|
||||
private var nextBatch: String? = null
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: SearchViewState): SearchViewModel
|
||||
}
|
||||
|
|
|
@ -18,8 +18,9 @@ package im.vector.app.features.home.room.detail.timeline.action
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import dagger.Lazy
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.canReact
|
||||
|
@ -75,7 +76,7 @@ class MessageActionsViewModel @AssistedInject constructor(@Assisted
|
|||
pillsPostProcessorFactory.create(initialState.roomId)
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: MessageActionState): MessageActionsViewModel
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.date.VectorDateFormatter
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
|
@ -61,7 +62,7 @@ class ViewEditHistoryViewModel @AssistedInject constructor(@Assisted
|
|||
private val room = session.getRoom(roomId)
|
||||
?: throw IllegalStateException("Shouldn't use this ViewModel without a room")
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: ViewEditHistoryViewState): ViewEditHistoryViewModel
|
||||
}
|
||||
|
|
|
@ -22,8 +22,9 @@ import com.airbnb.mvrx.MvRxState
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.date.DateFormatKind
|
||||
import im.vector.app.core.date.VectorDateFormatter
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
|
@ -68,7 +69,7 @@ class ViewReactionsViewModel @AssistedInject constructor(@Assisted
|
|||
private val room = session.getRoom(roomId)
|
||||
?: throw IllegalStateException("Shouldn't use this ViewModel without a room")
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: DisplayReactionsViewState): ViewReactionsViewModel
|
||||
}
|
||||
|
|
|
@ -18,8 +18,9 @@ package im.vector.app.features.home.room.list.actions
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -31,7 +32,7 @@ class RoomListQuickActionsViewModel @AssistedInject constructor(@Assisted initia
|
|||
private val session: Session
|
||||
) : VectorViewModel<RoomListQuickActionsState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomListQuickActionsState): RoomListQuickActionsViewModel
|
||||
}
|
||||
|
|
|
@ -20,8 +20,9 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.di.HasScreenInjector
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
|
@ -42,7 +43,7 @@ class HomeServerCapabilitiesViewModel @AssistedInject constructor(
|
|||
private val rawService: RawService
|
||||
) : VectorViewModel<HomeServerCapabilitiesViewState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: HomeServerCapabilitiesViewState): HomeServerCapabilitiesViewModel
|
||||
}
|
||||
|
|
|
@ -19,8 +19,9 @@ package im.vector.app.features.html
|
|||
import android.content.Context
|
||||
import android.text.Spannable
|
||||
import android.text.Spanned
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
import im.vector.app.core.glide.GlideApp
|
||||
import im.vector.app.features.home.AvatarRenderer
|
||||
|
@ -37,7 +38,7 @@ class PillsPostProcessor @AssistedInject constructor(@Assisted private val roomI
|
|||
private val sessionHolder: ActiveSessionHolder)
|
||||
: EventHtmlRenderer.PostProcessor {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String?): PillsPostProcessor
|
||||
}
|
||||
|
|
|
@ -19,8 +19,9 @@ package im.vector.app.features.invite
|
|||
import com.airbnb.mvrx.ActivityViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
|
@ -37,7 +38,7 @@ class InviteUsersToRoomViewModel @AssistedInject constructor(@Assisted
|
|||
|
||||
private val room = session.getRoom(initialState.roomId)!!
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: InviteUsersToRoomViewState): InviteUsersToRoomViewModel
|
||||
}
|
||||
|
|
|
@ -26,8 +26,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
import im.vector.app.core.extensions.configureAndStart
|
||||
|
@ -68,7 +69,7 @@ class LoginViewModel @AssistedInject constructor(
|
|||
private val homeServerHistoryService: HomeServerHistoryService
|
||||
) : VectorViewModel<LoginViewState, LoginAction, LoginViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: LoginViewState): LoginViewModel
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -50,7 +51,7 @@ class MatrixToBottomSheetViewModel @AssistedInject constructor(
|
|||
private val stringProvider: StringProvider,
|
||||
private val rawService: RawService) : VectorViewModel<MatrixToBottomSheetState, MatrixToAction, MatrixToViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: MatrixToBottomSheetState): MatrixToBottomSheetViewModel
|
||||
}
|
||||
|
|
|
@ -19,8 +19,9 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.MvRxState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.features.reactions.data.EmojiDataSource
|
||||
|
@ -36,7 +37,7 @@ class EmojiSearchResultViewModel @AssistedInject constructor(
|
|||
private val dataSource: EmojiDataSource)
|
||||
: VectorViewModel<EmojiSearchResultViewState, EmojiSearchAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: EmojiSearchResultViewState): EmojiSearchResultViewModel
|
||||
}
|
||||
|
|
|
@ -21,8 +21,9 @@ import com.airbnb.mvrx.FragmentViewModelContext
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.jakewharton.rxrelay2.BehaviorRelay
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -48,7 +49,7 @@ class RequireActiveMembershipViewModel @AssistedInject constructor(
|
|||
private val session: Session)
|
||||
: VectorViewModel<RequireActiveMembershipViewState, RequireActiveMembershipAction, RequireActiveMembershipViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RequireActiveMembershipViewState): RequireActiveMembershipViewModel
|
||||
}
|
||||
|
|
|
@ -23,8 +23,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.airbnb.mvrx.appendAt
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import org.matrix.android.sdk.api.MatrixCallback
|
||||
import org.matrix.android.sdk.api.extensions.orFalse
|
||||
|
@ -46,7 +47,7 @@ class RoomDirectoryViewModel @AssistedInject constructor(@Assisted initialState:
|
|||
private val session: Session)
|
||||
: VectorViewModel<PublicRoomsViewState, RoomDirectoryAction, RoomDirectoryViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: PublicRoomsViewState): RoomDirectoryViewModel
|
||||
}
|
||||
|
|
|
@ -25,8 +25,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.features.raw.wellknown.getElementWellknown
|
||||
|
@ -46,7 +47,7 @@ class CreateRoomViewModel @AssistedInject constructor(@Assisted initialState: Cr
|
|||
private val rawService: RawService
|
||||
) : VectorViewModel<CreateRoomViewState, CreateRoomAction, CreateRoomViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: CreateRoomViewState): CreateRoomViewModel
|
||||
}
|
||||
|
|
|
@ -21,8 +21,9 @@ import com.airbnb.mvrx.FragmentViewModelContext
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import org.matrix.android.sdk.api.MatrixCallback
|
||||
|
@ -33,7 +34,7 @@ class RoomDirectoryPickerViewModel @AssistedInject constructor(@Assisted initial
|
|||
private val session: Session)
|
||||
: VectorViewModel<RoomDirectoryPickerViewState, RoomDirectoryPickerAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomDirectoryPickerViewState): RoomDirectoryPickerViewModel
|
||||
}
|
||||
|
|
|
@ -22,8 +22,9 @@ import com.airbnb.mvrx.Loading
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -46,7 +47,7 @@ class RoomPreviewViewModel @AssistedInject constructor(@Assisted private val ini
|
|||
private val session: Session)
|
||||
: VectorViewModel<RoomPreviewViewState, RoomPreviewAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomPreviewViewState): RoomPreviewViewModel
|
||||
}
|
||||
|
|
|
@ -25,8 +25,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
|
@ -61,7 +62,7 @@ class RoomMemberProfileViewModel @AssistedInject constructor(@Assisted private v
|
|||
private val session: Session)
|
||||
: VectorViewModel<RoomMemberProfileViewState, RoomMemberProfileAction, RoomMemberProfileViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomMemberProfileViewState): RoomMemberProfileViewModel
|
||||
}
|
||||
|
|
|
@ -22,8 +22,9 @@ import com.airbnb.mvrx.Loading
|
|||
import com.airbnb.mvrx.MvRxState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.di.HasScreenInjector
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -48,7 +49,7 @@ class DeviceListBottomSheetViewModel @AssistedInject constructor(@Assisted priva
|
|||
private val session: Session)
|
||||
: VectorViewModel<DeviceListViewState, DeviceListAction, DeviceListBottomSheetViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: DeviceListViewState, args: DeviceListBottomSheet.Args): DeviceListBottomSheetViewModel
|
||||
}
|
||||
|
|
|
@ -21,8 +21,9 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -49,7 +50,7 @@ class RoomProfileViewModel @AssistedInject constructor(
|
|||
private val session: Session
|
||||
) : VectorViewModel<RoomProfileViewState, RoomProfileAction, RoomProfileViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomProfileViewState): RoomProfileViewModel
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.features.powerlevel.PowerLevelsObservableFactory
|
||||
|
@ -44,7 +45,7 @@ class RoomAliasViewModel @AssistedInject constructor(@Assisted initialState: Roo
|
|||
private val session: Session)
|
||||
: VectorViewModel<RoomAliasViewState, RoomAliasAction, RoomAliasViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomAliasViewState): RoomAliasViewModel
|
||||
}
|
||||
|
|
|
@ -18,8 +18,9 @@ package im.vector.app.features.roomprofile.alias.detail
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -30,7 +31,7 @@ class RoomAliasBottomSheetViewModel @AssistedInject constructor(
|
|||
session: Session
|
||||
) : VectorViewModel<RoomAliasBottomSheetState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomAliasBottomSheetState): RoomAliasBottomSheetViewModel
|
||||
}
|
||||
|
|
|
@ -20,8 +20,9 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -47,7 +48,7 @@ class RoomBannedMemberListViewModel @AssistedInject constructor(@Assisted initia
|
|||
private val session: Session)
|
||||
: VectorViewModel<RoomBannedMemberListViewState, RoomBannedMemberListAction, RoomBannedMemberListViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomBannedMemberListViewState): RoomBannedMemberListViewModel
|
||||
}
|
||||
|
|
|
@ -20,8 +20,9 @@ import androidx.lifecycle.viewModelScope
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -53,7 +54,7 @@ class RoomMemberListViewModel @AssistedInject constructor(@Assisted initialState
|
|||
private val session: Session)
|
||||
: VectorViewModel<RoomMemberListViewState, RoomMemberListAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomMemberListViewState): RoomMemberListViewModel
|
||||
}
|
||||
|
|
|
@ -21,8 +21,9 @@ import com.airbnb.mvrx.FragmentViewModelContext
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.features.powerlevel.PowerLevelsObservableFactory
|
||||
|
@ -39,7 +40,7 @@ class RoomPermissionsViewModel @AssistedInject constructor(@Assisted initialStat
|
|||
private val session: Session)
|
||||
: VectorViewModel<RoomPermissionsViewState, RoomPermissionsAction, RoomPermissionsViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomPermissionsViewState): RoomPermissionsViewModel
|
||||
}
|
||||
|
|
|
@ -20,8 +20,9 @@ import androidx.core.net.toFile
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.features.powerlevel.PowerLevelsObservableFactory
|
||||
|
@ -45,7 +46,7 @@ class RoomSettingsViewModel @AssistedInject constructor(@Assisted initialState:
|
|||
private val session: Session)
|
||||
: VectorViewModel<RoomSettingsViewState, RoomSettingsAction, RoomSettingsViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomSettingsViewState): RoomSettingsViewModel
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ import com.airbnb.mvrx.Loading
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -41,7 +42,7 @@ class RoomUploadsViewModel @AssistedInject constructor(
|
|||
private val session: Session
|
||||
) : VectorViewModel<RoomUploadsViewState, RoomUploadsAction, RoomUploadsViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomUploadsViewState): RoomUploadsViewModel
|
||||
}
|
||||
|
|
|
@ -20,8 +20,9 @@ import com.airbnb.mvrx.FragmentViewModelContext
|
|||
import com.airbnb.mvrx.MvRxState
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.core.platform.VectorViewModelAction
|
||||
|
@ -43,7 +44,7 @@ class DeactivateAccountViewModel @AssistedInject constructor(@Assisted private v
|
|||
private val session: Session)
|
||||
: VectorViewModel<DeactivateAccountViewState, DeactivateAccountAction, DeactivateAccountViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: DeactivateAccountViewState): DeactivateAccountViewModel
|
||||
}
|
||||
|
|
|
@ -18,8 +18,9 @@ package im.vector.app.features.settings.crosssigning
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import io.reactivex.Observable
|
||||
import io.reactivex.functions.BiFunction
|
||||
|
@ -57,7 +58,7 @@ class CrossSigningSettingsViewModel @AssistedInject constructor(@Assisted privat
|
|||
}
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: CrossSigningSettingsViewState): CrossSigningSettingsViewModel
|
||||
}
|
||||
|
|
|
@ -19,8 +19,9 @@ import com.airbnb.mvrx.FragmentViewModelContext
|
|||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -33,7 +34,7 @@ class DeviceVerificationInfoBottomSheetViewModel @AssistedInject constructor(@As
|
|||
val session: Session
|
||||
) : VectorViewModel<DeviceVerificationInfoBottomSheetViewState, EmptyAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: DeviceVerificationInfoBottomSheetViewState, deviceId: String): DeviceVerificationInfoBottomSheetViewModel
|
||||
}
|
||||
|
|
|
@ -26,8 +26,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.error.SsoFlowNotSupportedYet
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import io.reactivex.Observable
|
||||
|
@ -72,7 +73,7 @@ class DevicesViewModel @AssistedInject constructor(
|
|||
private val session: Session
|
||||
) : VectorViewModel<DevicesViewState, DevicesAction, DevicesViewEvents>(initialState), VerificationService.Listener {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: DevicesViewState): DevicesViewModel
|
||||
}
|
||||
|
|
|
@ -23,8 +23,9 @@ import com.airbnb.mvrx.MvRxState
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -63,7 +64,7 @@ class AccountDataViewModel @AssistedInject constructor(@Assisted initialState: A
|
|||
}
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: AccountDataViewState): AccountDataViewModel
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ import com.airbnb.mvrx.MvRxState
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -57,7 +58,7 @@ class GossipingEventsPaperTrailViewModel @AssistedInject constructor(@Assisted i
|
|||
|
||||
override fun handle(action: EmptyAction) {}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: GossipingEventsPaperTrailState): GossipingEventsPaperTrailViewModel
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ import com.airbnb.mvrx.MvRxState
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -65,7 +66,7 @@ class KeyRequestListViewModel @AssistedInject constructor(@Assisted initialState
|
|||
|
||||
override fun handle(action: EmptyAction) {}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: KeyRequestListViewState): KeyRequestListViewModel
|
||||
}
|
||||
|
|
|
@ -27,8 +27,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -54,7 +55,7 @@ class KeyRequestViewModel @AssistedInject constructor(
|
|||
private val session: Session)
|
||||
: VectorViewModel<KeyRequestViewState, KeyRequestAction, KeyRequestEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: KeyRequestViewState): KeyRequestViewModel
|
||||
}
|
||||
|
|
|
@ -25,8 +25,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.core.platform.VectorViewModelAction
|
||||
import org.matrix.android.sdk.api.MatrixCallback
|
||||
|
@ -47,7 +48,7 @@ class IgnoredUsersViewModel @AssistedInject constructor(@Assisted initialState:
|
|||
private val session: Session)
|
||||
: VectorViewModel<IgnoredUsersViewState, IgnoredUsersAction, IgnoredUsersViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: IgnoredUsersViewState): IgnoredUsersViewModel
|
||||
}
|
||||
|
|
|
@ -22,8 +22,9 @@ import com.airbnb.mvrx.FragmentViewModelContext
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.features.configuration.VectorConfiguration
|
||||
|
@ -35,7 +36,7 @@ class LocalePickerViewModel @AssistedInject constructor(
|
|||
private val vectorConfiguration: VectorConfiguration
|
||||
) : VectorViewModel<LocalePickerViewState, LocalePickerAction, LocalePickerViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: LocalePickerViewState): LocalePickerViewModel
|
||||
}
|
||||
|
|
|
@ -22,8 +22,9 @@ import com.airbnb.mvrx.MvRxState
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -39,7 +40,7 @@ class PushGatewaysViewModel @AssistedInject constructor(@Assisted initialState:
|
|||
private val session: Session)
|
||||
: VectorViewModel<PushGatewayViewState, PushGatewayAction, EmptyViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: PushGatewayViewState): PushGatewaysViewModel
|
||||
}
|
||||
|
|
|
@ -23,8 +23,9 @@ import com.airbnb.mvrx.FragmentViewModelContext
|
|||
import com.airbnb.mvrx.Loading
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.error.SsoFlowNotSupportedYet
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
|
@ -89,7 +90,7 @@ class ThreePidsSettingsViewModel @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: ThreePidsSettingsViewState): ThreePidsSettingsViewModel
|
||||
}
|
||||
|
|
|
@ -20,8 +20,9 @@ import com.airbnb.mvrx.FragmentViewModelContext
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.jakewharton.rxrelay2.BehaviorRelay
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.extensions.toggle
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -42,7 +43,7 @@ class IncomingShareViewModel @AssistedInject constructor(
|
|||
private val breadcrumbsRoomComparator: BreadcrumbsRoomComparator)
|
||||
: VectorViewModel<IncomingShareViewState, IncomingShareAction, IncomingShareViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: IncomingShareViewState): IncomingShareViewModel
|
||||
}
|
||||
|
|
|
@ -23,8 +23,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.di.ActiveSessionHolder
|
||||
import im.vector.app.core.extensions.hasUnsavedKeys
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -47,7 +48,7 @@ class SoftLogoutViewModel @AssistedInject constructor(
|
|||
private val authenticationService: AuthenticationService
|
||||
) : VectorViewModel<SoftLogoutViewState, SoftLogoutAction, SoftLogoutViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: SoftLogoutViewState): SoftLogoutViewModel
|
||||
}
|
||||
|
|
|
@ -22,8 +22,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -35,7 +36,7 @@ class ReviewTermsViewModel @AssistedInject constructor(
|
|||
private val session: Session
|
||||
) : VectorViewModel<ReviewTermsViewState, ReviewTermsAction, ReviewTermsViewEvents>(initialState) {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: ReviewTermsViewState): ReviewTermsViewModel
|
||||
}
|
||||
|
|
|
@ -21,8 +21,9 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
|
@ -66,7 +67,7 @@ class UserCodeSharedViewModel @AssistedInject constructor(
|
|||
}
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: UserCodeState): UserCodeSharedViewModel
|
||||
}
|
||||
|
|
|
@ -21,8 +21,9 @@ import com.airbnb.mvrx.FragmentViewModelContext
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.jakewharton.rxrelay2.BehaviorRelay
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.extensions.toggle
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -51,7 +52,7 @@ class UserListViewModel @AssistedInject constructor(@Assisted initialState: User
|
|||
|
||||
private var currentUserSearchDisposable: Disposable? = null
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: UserListViewState): UserListViewModel
|
||||
}
|
||||
|
|
|
@ -17,8 +17,9 @@
|
|||
package im.vector.app.features.widgets
|
||||
|
||||
import android.text.TextUtils
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import kotlinx.coroutines.GlobalScope
|
||||
|
@ -45,7 +46,7 @@ class WidgetPostAPIHandler @AssistedInject constructor(@Assisted private val roo
|
|||
private val stringProvider: StringProvider,
|
||||
private val session: Session) : WidgetPostAPIMediator.Handler {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(roomId: String): WidgetPostAPIHandler
|
||||
}
|
||||
|
|
|
@ -25,8 +25,9 @@ import com.airbnb.mvrx.Loading
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import im.vector.app.core.resources.StringProvider
|
||||
import im.vector.app.features.widgets.permissions.WidgetPermissionsHelper
|
||||
|
@ -55,7 +56,7 @@ class WidgetViewModel @AssistedInject constructor(@Assisted val initialState: Wi
|
|||
WidgetPostAPIHandler.NavigationCallback,
|
||||
IntegrationManagerService.Listener {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: WidgetViewState): WidgetViewModel
|
||||
}
|
||||
|
|
|
@ -20,8 +20,9 @@ import com.airbnb.mvrx.ActivityViewModelContext
|
|||
import com.airbnb.mvrx.FragmentViewModelContext
|
||||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.R
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
import kotlinx.coroutines.launch
|
||||
|
@ -141,7 +142,7 @@ class RoomWidgetPermissionViewModel @AssistedInject constructor(@Assisted val in
|
|||
}
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: RoomWidgetPermissionViewState): RoomWidgetPermissionViewModel
|
||||
}
|
||||
|
|
|
@ -24,8 +24,9 @@ import com.airbnb.mvrx.MvRxState
|
|||
import com.airbnb.mvrx.MvRxViewModelFactory
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.platform.EmptyAction
|
||||
import im.vector.app.core.platform.EmptyViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -69,7 +70,7 @@ class ServerBackupStatusViewModel @AssistedInject constructor(@Assisted initialS
|
|||
private val session: Session)
|
||||
: VectorViewModel<ServerBackupStatusViewState, EmptyAction, EmptyViewEvents>(initialState), KeysBackupStateListener {
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: ServerBackupStatusViewState): ServerBackupStatusViewModel
|
||||
}
|
||||
|
|
|
@ -26,8 +26,9 @@ import com.airbnb.mvrx.MvRxViewModelFactory
|
|||
import com.airbnb.mvrx.Success
|
||||
import com.airbnb.mvrx.Uninitialized
|
||||
import com.airbnb.mvrx.ViewModelContext
|
||||
import com.squareup.inject.assisted.Assisted
|
||||
import com.squareup.inject.assisted.AssistedInject
|
||||
import dagger.assisted.Assisted
|
||||
import dagger.assisted.AssistedInject
|
||||
import dagger.assisted.AssistedFactory
|
||||
import im.vector.app.core.extensions.exhaustive
|
||||
import im.vector.app.core.platform.VectorViewEvents
|
||||
import im.vector.app.core.platform.VectorViewModel
|
||||
|
@ -63,7 +64,7 @@ class SignoutCheckViewModel @AssistedInject constructor(@Assisted initialState:
|
|||
data class ExportKeys(val exporter: KeysExporter, val passphrase: String, val uri: Uri) : ViewEvents()
|
||||
}
|
||||
|
||||
@AssistedInject.Factory
|
||||
@AssistedFactory
|
||||
interface Factory {
|
||||
fun create(initialState: SignoutCheckViewState): SignoutCheckViewModel
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue