use of im.actor.core.modules.messaging.router.entity.RouterConversationHidden 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());
}
}
}
use of im.actor.core.modules.messaging.router.entity.RouterConversationHidden in project actor-platform by actorapp.
the class RouterActor method onReceive.
@Override
public void onReceive(Object message) {
if (!activeDialogStorage.isLoaded() && message instanceof RouterMessageOnlyActive) {
stash();
return;
}
if (message instanceof RouterConversationVisible) {
RouterConversationVisible conversationVisible = (RouterConversationVisible) message;
onConversationVisible(conversationVisible.getPeer());
} else if (message instanceof RouterConversationHidden) {
RouterConversationHidden conversationHidden = (RouterConversationHidden) message;
onConversationHidden(conversationHidden.getPeer());
} else if (message instanceof RouterAppVisible) {
onAppVisible();
} else if (message instanceof RouterAppHidden) {
onAppHidden();
} else {
super.onReceive(message);
}
}
Aggregations