Added IsWriting event on common, server and partially on client side
additionally fixed NullPointerException in ContactSearchScene and typo in Javadoc PS: this is the 1000th commit in Envoy! 🥳 🎉
This commit is contained in:
53
common/src/main/java/envoy/event/IsWriting.java
Normal file
53
common/src/main/java/envoy/event/IsWriting.java
Normal file
@ -0,0 +1,53 @@
|
||||
package envoy.event;
|
||||
|
||||
/**
|
||||
* This event should be sent when a user wrote anything in a chat.
|
||||
* <p>
|
||||
* Project: <strong>envoy-client</strong><br>
|
||||
* File: <strong>IsWriting.java</strong><br>
|
||||
* Created: <strong>24.07.2020</strong><br>
|
||||
*
|
||||
* @author Leon Hofmeister
|
||||
* @since Envoy Client v0.2-beta
|
||||
*/
|
||||
public class IsWriting extends Event<Long> {
|
||||
|
||||
private final long destinationID;
|
||||
|
||||
private final String displayName;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* The number of milliseconds that this event will be active.<br>
|
||||
* Currently set to 3.5 seconds.
|
||||
*/
|
||||
public static final int millisecondsActive = 3500;
|
||||
|
||||
/**
|
||||
* Creates a new {@code IsWriting} with originator and recipient.
|
||||
*
|
||||
* @param sourceID the id of the originator
|
||||
* @param displayName the name of the originator
|
||||
* @param destinationID the id of the contact the user wrote to
|
||||
* @since Envoy Client v0.2-beta
|
||||
*/
|
||||
public IsWriting(Long sourceID, long destinationID, String displayName) {
|
||||
super(sourceID);
|
||||
this.destinationID = destinationID;
|
||||
this.displayName = displayName;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the id of the contact in whose chat the user wrote something
|
||||
* @since Envoy Client v0.2-beta
|
||||
*/
|
||||
public long getDestinationID() { return destinationID; }
|
||||
|
||||
/**
|
||||
* @return the name of the originator to display
|
||||
* @since Envoy Common v0.2-beta
|
||||
*/
|
||||
public String getDisplayName() { return displayName; }
|
||||
|
||||
}
|
Reference in New Issue
Block a user