Search in sources :

Example 1 with AppVisibleChanged

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());
        }
    }
}
Also used : RouterAppVisible(im.actor.core.modules.messaging.router.entity.RouterAppVisible) RouterAppHidden(im.actor.core.modules.messaging.router.entity.RouterAppHidden) PeerChatOpened(im.actor.core.events.PeerChatOpened) AppVisibleChanged(im.actor.core.events.AppVisibleChanged) PeerChatClosed(im.actor.core.events.PeerChatClosed) RouterConversationVisible(im.actor.core.modules.messaging.router.entity.RouterConversationVisible) RouterConversationHidden(im.actor.core.modules.messaging.router.entity.RouterConversationHidden)

Aggregations

AppVisibleChanged (im.actor.core.events.AppVisibleChanged)1 PeerChatClosed (im.actor.core.events.PeerChatClosed)1 PeerChatOpened (im.actor.core.events.PeerChatOpened)1 RouterAppHidden (im.actor.core.modules.messaging.router.entity.RouterAppHidden)1 RouterAppVisible (im.actor.core.modules.messaging.router.entity.RouterAppVisible)1 RouterConversationHidden (im.actor.core.modules.messaging.router.entity.RouterConversationHidden)1 RouterConversationVisible (im.actor.core.modules.messaging.router.entity.RouterConversationVisible)1