Skip to content

Commit

Permalink
Better docs
Browse files Browse the repository at this point in the history
  • Loading branch information
smikhalevski committed Dec 22, 2023
1 parent 6484453 commit 57e89ce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ import org.racehorse.ActivityPlugin
EventBus.getDefault().register(ActivityPlugin().also { enable() })
```

3. Start the activity, for example to open settings app and navigate user to the notification settings:
3. Start a new activity. For example, here's how to open Settings app and navigate user to the notification settings:

```ts
import { activityManager, Intent } from 'racehorse';
Expand All @@ -378,7 +378,7 @@ activityManager.startActivity({
});
```

4. Synchronously read the activity status or subscribe to its changes:
4. Synchronously read the status of the current activity or subscribe to its changes:

```ts
import { activityManager, ActivityState } from 'racehorse';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ class StartActivityForResultEvent(val intent: SerializableIntent) : RequestEvent
}

/**
* Opens URL in an external app.
* Launches activities for various intents, and provides info about the current activity.
*
* @param activity The activity that launches the intent to open a URL.
* @param eventBus The event bus to which events are posted.
*/
open class ActivityPlugin(
private val activity: ComponentActivity,
Expand Down
2 changes: 1 addition & 1 deletion web/racehorse/src/main/createActivityManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ const eventTypeToActivityState = {
} as const;

/**
* Launches activities for various intents.
* Launches activities for various intents, and provides info about the current activity.
*
* @param eventBridge The underlying event bridge.
*/
Expand Down

0 comments on commit 57e89ce

Please sign in to comment.