Cannot push events to the callbacksRelay from child class
Nobody has claimed this yet.
- Dominant language
- Kotlin
- Stars
- 7.9k
- Forks
- 914
- PR merge metrics
- No merged PRs in 30d
Description
Expected Behavior
We should be able to send events to the the callbacksRelay in RibActivity from the child classes that inherit from RibActivity
Current Behavior
Interaction to callbacksRelay is only one way (can listen to it) using the public Observable<ActivityCallbackEvent> callbacks() function but since the Relay is hidden we aren't able to send events to it.
Possible Solution
Create a protected function <function name>(ActivityCallbackEvent event) in RibActivity through which child Activities can send ActivityCallbackEvent
Context (Environment)
In case we have a logical way of sending an ActivityCallbackEvent through any of the system overriden methods lets say onActivityResult then we have to create a local instance of callbacksRelay and override the callbacks() function to return our local instance. In this case we need to re-implement all the other system notifications as well like onTrimMemory, onLowMemory. It's not very obvious and can be future error prone
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with RibActivity and inspect the callbacks() method and its callbacksRelay visibility. Trace how child Activities inherit the class and verify that they can emit ActivityCallbackEvent values without replacing callbacks() or reimplementing system notifications such as onActivityResult, onTrimMemory, and onLowMemory.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, kotlin
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 65/100