use of im.actor.core.events.AppVisibleChanged in project actor-platform by actorapp.
the class RouterInt method onBusEvent.
@Override
public void onBusEvent(Event event) {
if (event instanceof PeerChatOpened) {
PeerChatOpened peerChatOpened = (PeerChatOpened) event;
send(new RouterConversationVisible(peerChatOpened.getPeer()));
} else if (event instanceof PeerChatClosed) {
PeerChatClosed peerChatClosed = (PeerChatClosed) event;
send(new RouterConversationHidden(peerChatClosed.getPeer()));
} else if (event instanceof AppVisibleChanged) {
if (((AppVisibleChanged) event).isVisible()) {
send(new RouterAppVisible());
} else {
send(new RouterAppHidden());
}
}
}
Aggregations