Add global context.cacheDir provider. (#1606)

## Type of change

- [ ] Feature
- [ ] Bugfix
- [x] Technical
- [ ] Other :

## Content

Dagger now provides the app's `cacheDir` when requesting a `@CacheDirectory File`  type.

## Motivation and context

To support some upcoming code that needs the `cacheDir` to be changed during tests.
This commit is contained in:
Marco Romano 2023-10-19 14:07:45 +02:00 committed by GitHub
parent 5a7f77bc92
commit 33f5c8efb8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 45 additions and 6 deletions

View file

@ -49,8 +49,8 @@ class MainActivity : ComponentActivity() {
sessionStore = sessionStore,
userAgentProvider = userAgentProvider,
rustMatrixClientFactory = RustMatrixClientFactory(
context = applicationContext,
baseDirectory = baseDirectory,
cacheDirectory = applicationContext.cacheDir,
appCoroutineScope = Singleton.appScope,
coroutineDispatchers = Singleton.coroutineDispatchers,
sessionStore = sessionStore,