Refactored IsWriting to IsTyping

This commit is contained in:
delvh
2020-07-25 17:12:24 +02:00
parent e382a86623
commit 5a5e6e2086
6 changed files with 27 additions and 36 deletions

View File

@ -1,21 +1,20 @@
package envoy.event;
/**
* This event should be sent when a user wrote anything in a chat.
* This event should be sent when a user is currently typing something in a
* chat.
* <p>
* Project: <strong>envoy-client</strong><br>
* File: <strong>IsWriting.java</strong><br>
* File: <strong>IsTyping.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> {
public class IsTyping extends Event<Long> {
private final long destinationID;
private final String displayName;
private static final long serialVersionUID = 1L;
/**
@ -27,28 +26,20 @@ public class IsWriting extends Event<Long> {
public static final int millisecondsActive = 3500;
/**
* Creates a new {@code IsWriting} with originator and recipient.
* Creates a new {@code IsTyping} event 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 Common v0.2-beta
*/
public IsWriting(Long sourceID, long destinationID, String displayName) {
public IsTyping(Long sourceID, long destinationID) {
super(sourceID);
this.destinationID = destinationID;
this.displayName = displayName;
this.destinationID = destinationID;
}
/**
* @return the id of the contact in whose chat the user wrote something
* @return the id of the contact in whose chat the user typed something
* @since Envoy Common 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; }
}