Commit 78795815 authored by Filipe de Lima Brito's avatar Filipe de Lima Brito

Fix formmating for #1438

parent 6a851f39
...@@ -46,15 +46,19 @@ class ChatRoomsFragmentModule { ...@@ -46,15 +46,19 @@ class ChatRoomsFragmentModule {
@Provides @Provides
@PerFragment @PerFragment
fun provideRocketChatClient(factory: RocketChatClientFactory, fun provideRocketChatClient(
@Named("currentServer") currentServer: String): RocketChatClient { factory: RocketChatClientFactory,
@Named("currentServer") currentServer: String
): RocketChatClient {
return factory.create(currentServer) return factory.create(currentServer)
} }
@Provides @Provides
@PerFragment @PerFragment
fun provideDatabaseManager(factory: DatabaseManagerFactory, fun provideDatabaseManager(
@Named("currentServer") currentServer: String): DatabaseManager { factory: DatabaseManagerFactory,
@Named("currentServer") currentServer: String
): DatabaseManager {
return factory.create(currentServer) return factory.create(currentServer)
} }
...@@ -64,31 +68,39 @@ class ChatRoomsFragmentModule { ...@@ -64,31 +68,39 @@ class ChatRoomsFragmentModule {
@Provides @Provides
@PerFragment @PerFragment
fun provideConnectionManager(factory: ConnectionManagerFactory, fun provideConnectionManager(
@Named("currentServer") currentServer: String): ConnectionManager { factory: ConnectionManagerFactory,
@Named("currentServer") currentServer: String
): ConnectionManager {
return factory.create(currentServer) return factory.create(currentServer)
} }
@Provides @Provides
@PerFragment @PerFragment
fun provideFetchChatRoomsInteractor(client: RocketChatClient, fun provideFetchChatRoomsInteractor(
dbManager: DatabaseManager): FetchChatRoomsInteractor { client: RocketChatClient,
dbManager: DatabaseManager
): FetchChatRoomsInteractor {
return FetchChatRoomsInteractor(client, dbManager) return FetchChatRoomsInteractor(client, dbManager)
} }
@Provides @Provides
@PerFragment @PerFragment
fun providePublicSettings(repository: SettingsRepository, fun providePublicSettings(
@Named("currentServer") currentServer: String): PublicSettings { repository: SettingsRepository,
@Named("currentServer") currentServer: String
): PublicSettings {
return repository.get(currentServer) return repository.get(currentServer)
} }
@Provides @Provides
@PerFragment @PerFragment
fun provideRoomMapper(context: Application, fun provideRoomMapper(
repository: SettingsRepository, context: Application,
localRepository: LocalRepository, repository: SettingsRepository,
@Named("currentServer") serverUrl: String): RoomUiModelMapper { localRepository: LocalRepository,
@Named("currentServer") serverUrl: String
): RoomUiModelMapper {
return RoomUiModelMapper(context, repository.get(serverUrl), localRepository, serverUrl) return RoomUiModelMapper(context, repository.get(serverUrl), localRepository, serverUrl)
} }
} }
\ No newline at end of file
...@@ -11,7 +11,6 @@ import kotlinx.coroutines.experimental.launch ...@@ -11,7 +11,6 @@ import kotlinx.coroutines.experimental.launch
import kotlinx.coroutines.experimental.withContext import kotlinx.coroutines.experimental.withContext
import kotlin.coroutines.experimental.CoroutineContext import kotlin.coroutines.experimental.CoroutineContext
class WrappedLiveData<Source, Output>( class WrappedLiveData<Source, Output>(
private val runContext: CoroutineContext = CommonPool, private val runContext: CoroutineContext = CommonPool,
private val source: LiveData<Source>, private val source: LiveData<Source>,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment