use of im.actor.core.api.rpc.RequestTyping in project actor-platform by actorapp.
the class OwnTypingActor method onTyping.
@Verified
private void onTyping(Peer peer) {
if (ActorTime.currentTime() - lastTypingTime < TYPING_DELAY) {
return;
}
lastTypingTime = ActorTime.currentTime();
ApiOutPeer outPeer = buidOutPeer(peer);
if (outPeer == null) {
return;
}
cancelPrevRequest();
prevRid = request(new RequestTyping(outPeer, ApiTypingType.TEXT));
if (typingCancellable != null) {
typingCancellable.cancel();
typingCancellable = null;
}
typingCancellable = schedule(new AbortTyping(peer), TYPING_CANCEL_DELAY);
}
Aggregations