Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
AloqaIM-Android
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
AloqaIM-Android
Commits
78795815
Commit
78795815
authored
Jul 13, 2018
by
Filipe de Lima Brito
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix formmating for #1438
parent
6a851f39
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
15 deletions
+26
-15
ChatRoomsFragmentModule.kt
...at/rocket/android/chatrooms/di/ChatRoomsFragmentModule.kt
+26
-14
WrappedLiveData.kt
...java/chat/rocket/android/util/livedata/WrappedLiveData.kt
+0
-1
No files found.
app/src/main/java/chat/rocket/android/chatrooms/di/ChatRoomsFragmentModule.kt
View file @
78795815
...
...
@@ -46,15 +46,19 @@ class ChatRoomsFragmentModule {
@Provides
@PerFragment
fun
provideRocketChatClient
(
factory
:
RocketChatClientFactory
,
@Named
(
"currentServer"
)
currentServer
:
String
):
RocketChatClient
{
fun
provideRocketChatClient
(
factory
:
RocketChatClientFactory
,
@Named
(
"currentServer"
)
currentServer
:
String
):
RocketChatClient
{
return
factory
.
create
(
currentServer
)
}
@Provides
@PerFragment
fun
provideDatabaseManager
(
factory
:
DatabaseManagerFactory
,
@Named
(
"currentServer"
)
currentServer
:
String
):
DatabaseManager
{
fun
provideDatabaseManager
(
factory
:
DatabaseManagerFactory
,
@Named
(
"currentServer"
)
currentServer
:
String
):
DatabaseManager
{
return
factory
.
create
(
currentServer
)
}
...
...
@@ -64,31 +68,39 @@ class ChatRoomsFragmentModule {
@Provides
@PerFragment
fun
provideConnectionManager
(
factory
:
ConnectionManagerFactory
,
@Named
(
"currentServer"
)
currentServer
:
String
):
ConnectionManager
{
fun
provideConnectionManager
(
factory
:
ConnectionManagerFactory
,
@Named
(
"currentServer"
)
currentServer
:
String
):
ConnectionManager
{
return
factory
.
create
(
currentServer
)
}
@Provides
@PerFragment
fun
provideFetchChatRoomsInteractor
(
client
:
RocketChatClient
,
dbManager
:
DatabaseManager
):
FetchChatRoomsInteractor
{
fun
provideFetchChatRoomsInteractor
(
client
:
RocketChatClient
,
dbManager
:
DatabaseManager
):
FetchChatRoomsInteractor
{
return
FetchChatRoomsInteractor
(
client
,
dbManager
)
}
@Provides
@PerFragment
fun
providePublicSettings
(
repository
:
SettingsRepository
,
@Named
(
"currentServer"
)
currentServer
:
String
):
PublicSettings
{
fun
providePublicSettings
(
repository
:
SettingsRepository
,
@Named
(
"currentServer"
)
currentServer
:
String
):
PublicSettings
{
return
repository
.
get
(
currentServer
)
}
@Provides
@PerFragment
fun
provideRoomMapper
(
context
:
Application
,
repository
:
SettingsRepository
,
localRepository
:
LocalRepository
,
@Named
(
"currentServer"
)
serverUrl
:
String
):
RoomUiModelMapper
{
fun
provideRoomMapper
(
context
:
Application
,
repository
:
SettingsRepository
,
localRepository
:
LocalRepository
,
@Named
(
"currentServer"
)
serverUrl
:
String
):
RoomUiModelMapper
{
return
RoomUiModelMapper
(
context
,
repository
.
get
(
serverUrl
),
localRepository
,
serverUrl
)
}
}
\ No newline at end of file
app/src/main/java/chat/rocket/android/util/livedata/WrappedLiveData.kt
View file @
78795815
...
...
@@ -11,7 +11,6 @@ import kotlinx.coroutines.experimental.launch
import
kotlinx.coroutines.experimental.withContext
import
kotlin.coroutines.experimental.CoroutineContext
class
WrappedLiveData
<
Source
,
Output
>(
private
val
runContext
:
CoroutineContext
=
CommonPool
,
private
val
source
:
LiveData
<
Source
>,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment