Search in sources :

Example 1 with RouterMessageOnlyActive

use of im.actor.core.modules.messaging.router.entity.RouterMessageOnlyActive 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);
    }
}
Also used : RouterAppVisible(im.actor.core.modules.messaging.router.entity.RouterAppVisible) RouterAppHidden(im.actor.core.modules.messaging.router.entity.RouterAppHidden) RouterMessageOnlyActive(im.actor.core.modules.messaging.router.entity.RouterMessageOnlyActive) RouterConversationVisible(im.actor.core.modules.messaging.router.entity.RouterConversationVisible) RouterConversationHidden(im.actor.core.modules.messaging.router.entity.RouterConversationHidden)

Aggregations

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 RouterMessageOnlyActive (im.actor.core.modules.messaging.router.entity.RouterMessageOnlyActive)1