Create a Wellknown module, because both AuthModule and HomeServerCapability module need it
This commit is contained in:
parent
225b1c380e
commit
8049962a99
|
@ -26,15 +26,14 @@ import im.vector.matrix.android.internal.auth.db.AuthRealmModule
|
|||
import im.vector.matrix.android.internal.auth.db.RealmPendingSessionStore
|
||||
import im.vector.matrix.android.internal.auth.db.RealmSessionParamsStore
|
||||
import im.vector.matrix.android.internal.auth.wellknown.DefaultDirectLoginTask
|
||||
import im.vector.matrix.android.internal.auth.wellknown.DefaultGetWellknownTask
|
||||
import im.vector.matrix.android.internal.auth.wellknown.DirectLoginTask
|
||||
import im.vector.matrix.android.internal.auth.wellknown.GetWellknownTask
|
||||
import im.vector.matrix.android.internal.database.RealmKeysUtils
|
||||
import im.vector.matrix.android.internal.di.AuthDatabase
|
||||
import im.vector.matrix.android.internal.wellknown.WellknownModule
|
||||
import io.realm.RealmConfiguration
|
||||
import java.io.File
|
||||
|
||||
@Module
|
||||
@Module(includes = [WellknownModule::class])
|
||||
internal abstract class AuthModule {
|
||||
|
||||
@Module
|
||||
|
@ -74,9 +73,6 @@ internal abstract class AuthModule {
|
|||
@Binds
|
||||
abstract fun bindSessionCreator(creator: DefaultSessionCreator): SessionCreator
|
||||
|
||||
@Binds
|
||||
abstract fun bindGetWellknownTask(task: DefaultGetWellknownTask): GetWellknownTask
|
||||
|
||||
@Binds
|
||||
abstract fun bindDirectLoginTask(task: DefaultDirectLoginTask): DirectLoginTask
|
||||
}
|
||||
|
|
|
@ -20,9 +20,10 @@ import dagger.Binds
|
|||
import dagger.Module
|
||||
import dagger.Provides
|
||||
import im.vector.matrix.android.internal.session.SessionScope
|
||||
import im.vector.matrix.android.internal.wellknown.WellknownModule
|
||||
import retrofit2.Retrofit
|
||||
|
||||
@Module
|
||||
@Module(includes = [WellknownModule::class])
|
||||
internal abstract class HomeServerCapabilitiesModule {
|
||||
|
||||
@Module
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
* Copyright (c) 2020 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.matrix.android.internal.wellknown
|
||||
|
||||
import dagger.Binds
|
||||
import dagger.Module
|
||||
|
||||
@Module
|
||||
internal abstract class WellknownModule {
|
||||
|
||||
@Binds
|
||||
abstract fun bindGetWellknownTask(task: DefaultGetWellknownTask): GetWellknownTask
|
||||
}
|
Loading…
Reference in New Issue