reactormonk
05/20/2024, 2:48 PMStylianos Gakis
05/20/2024, 3:08 PMreactormonk
05/20/2024, 3:08 PMCasey Brooks
05/20/2024, 3:16 PMZach Klippenstein (he/him) [MOD]
05/20/2024, 3:40 PMreactormonk
05/20/2024, 6:55 PM@Inject
a @Singleton
into a ViewModel?Casey Brooks
05/20/2024, 7:00 PMreactormonk
05/20/2024, 7:01 PM@HiltViewModel
🤔reactormonk
05/20/2024, 7:04 PMinterface ConnectionCache {
fun put(id: Long, connection: BrokerConnection)
fun get(id: Long): BrokerConnection?
}
@Provides
@Singleton
fun provideConnectionCache(): ConnectionCache = ConnectionCacheImpl()
Stylianos Gakis
05/20/2024, 7:20 PMreactormonk
05/20/2024, 7:40 PMscoped with @dagger.hilt.android.scopes.ViewModelScoped may not reference bindings with different scopes:
reactormonk
05/20/2024, 7:40 PMPablichjenkov
05/20/2024, 8:46 PM