Skip to content

Commit

Permalink
Service initialization doc
Browse files Browse the repository at this point in the history
  • Loading branch information
SalomonBrys committed Mar 31, 2024
1 parent 81e0a5f commit d49d46b
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion Readme.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,21 @@ It is needed if any of the following is true:
====


=== Initializing the Emoji Service

The first time you use emoji composable functions, the emoji service will need to initialise, which may take a few milliseconds.
You can initialise the emoji service ahead of time si that even the first emoji composable function invocation will be instantaneous:

[source,kotlin]
----
@Composable
fun App() {
remember { EmojiService.initialize() } //<1>
AppContent()
}
----
<1> Service initialization happens in the background and will *not* block the UI thread.

=== Displaying Emoji with Noto vector images

You can display an Emoji Image with `NotoImageEmoji`:
Expand Down Expand Up @@ -292,7 +307,7 @@ WithNotoImageEmoji(
<2> inlineContent: `Map<String, InlineTextContent>`


=== Accessing & customizing the Emoji Service
=== Customizing the Emoji Service

The `EmojiService` is the global reference to the `EmojiFinder` and `EmojiTemplateCatalog` used by this library. +
You can access it with:
Expand Down

0 comments on commit d49d46b

Please sign in to comment.