Private
Public Access
1
0

Fix for update

This commit is contained in:
2023-08-17 00:42:32 -07:00
parent 4eef98aef4
commit b38c51d108
2 changed files with 5 additions and 2 deletions

View File

@@ -18,8 +18,7 @@ object AppModule {
fun provideChatRepository(): ChatRepository { fun provideChatRepository(): ChatRepository {
val host = "http://192.168.1.123:5738" val host = "http://192.168.1.123:5738"
val client = RetrofitAPIClient(URL(host)) val client = RetrofitAPIClient(URL(host))
val apiInterface = client.getAPIInterface()
val database = CachedChatDatabase.liveDatabase() val database = CachedChatDatabase.liveDatabase()
return ChatRepository(apiInterface, database) return ChatRepository(client, database)
} }
} }

View File

@@ -20,5 +20,9 @@ class ConversationListViewModel @Inject constructor(
viewModelScope.launch { viewModelScope.launch {
repository.synchronize() repository.synchronize()
} }
viewModelScope.launch {
repository.beginWatchingForUpdates(this)
}
} }
} }