Implemented BackButton functionality

This commit is contained in:
2020-08-23 17:11:41 +02:00
parent d0f125f058
commit dbf69c7cc1
4 changed files with 29 additions and 15 deletions

View File

@ -40,6 +40,7 @@ import envoy.client.data.*;
import envoy.client.data.audio.AudioRecorder;
import envoy.client.data.commands.SystemCommandBuilder;
import envoy.client.data.commands.SystemCommandsMap;
import envoy.client.event.BackEvent;
import envoy.client.event.MessageCreationEvent;
import envoy.client.event.SendEvent;
import envoy.client.net.Client;
@ -186,7 +187,10 @@ public final class ChatScene implements Restorable {
} catch (Exception e2) {
e2.printStackTrace();
}
//Listen to backEvents
eventBus.register(BackEvent.class, e -> tabPane.getSelectionModel().select(0));
// Listen to received messages
eventBus.register(MessageCreationEvent.class, e -> {
final var message = e.get();