Skip to content

Commit

Permalink
address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinayagarwal committed Sep 12, 2024
1 parent 8c6472b commit e10f6be
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,12 @@ Run the sample nodes application:
mvn javafx:run -f samples/nodes
```

Run the sample introduction application:

```
mvn javafx:run -f samples/introduction
```

### Updater
Utility to manually update Emoji to the latest emoji data, whenever a new version is released.
Normally, this will be used by the library developers, but in case we are falling behind, you can use it too ;)
Expand Down
4 changes: 2 additions & 2 deletions emoji/src/main/java/com/gluonhq/emoji/EmojiLoaderFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ public class EmojiLoaderFactory {
public static EmojiSpriteLoader getEmojiImageLoader() {
if (emojiSpriteLoader == null) {
if (isClassAvailable(OFFLINE_LOADER_CLASS)) {
LOG.info("Loading " + OFFLINE_LOADER_CLASS);
LOG.fine("Loading " + OFFLINE_LOADER_CLASS);
emojiSpriteLoader = createInstance(OFFLINE_LOADER_CLASS);
} else {
LOG.info("Loading " + ONLINE_LOADER_CLASS);
LOG.fine("Loading " + ONLINE_LOADER_CLASS);
emojiSpriteLoader = createInstance(ONLINE_LOADER_CLASS);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,13 @@ public void start(Stage stage) {
}
});

EmojiLoaderFactory.getEmojiImageLoader().initialize().thenAccept(aBoolean -> {
if (!EmojiLoaderFactory.getEmojiImageLoader().isInitialized()) {
EmojiLoaderFactory.getEmojiImageLoader().initialize().thenAccept(aBoolean -> {
root.setDisable(false);
});
} else {
root.setDisable(false);
});
}

Scene scene = new Scene(root, 300, 200);
scene.getStylesheets().add(Main.class.getResource("styles.css").toExternalForm());
Expand Down

0 comments on commit e10f6be

Please sign in to comment.