element-hq / element-hq/element-x-android

[Architecture] Allow Activity to be injected through the dagger graph.

Open
#558 0 comments 0 reactions 0 assignees View on GitHub
S-Tolerable T-Task
Dominant language
Kotlin
Stars
2.4k
Forks
624
Avg merge
1d 14h
Merged PRs (30d)
149

Description

We might need to inject an activity context in some of our classes used by Presenter or others.
We can trick it by using the `LocalContext.current` but it's a hack.
We should probably create a `Component` owned by `MainActivity` so we can inject it in subcomponents.
It could require to create new subcomponents for Session and Room, as the existant ones can be used outside the context of an activity (like from notification).

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.