All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.intelie.live.plugins.messenger.chat.UserRoomState Maven / Gradle / Ivy

The newest version!
package net.intelie.live.plugins.messenger.chat;

public class UserRoomState {
    private String roomId;
    private boolean favorite = false;
    private boolean muted = false;
    private Long lastTimestampRead;
    private LastReadState lastRead;

    public UserRoomState(String roomId) {
        this.roomId = roomId;
    }

    public String getRoomId() {
        return roomId;
    }

    public boolean isFavorite() {
        return favorite;
    }

    public void setFavorite(boolean favorite) {
        this.favorite = favorite;
    }

    public boolean isMuted() {
        return muted;
    }

    public void setMuted(boolean muted) {
        this.muted = muted;
    }

    public LastReadState lastReadState(){
        if( lastRead == null){
            lastRead = new LastReadState(null, lastTimestampRead);
        }
        return lastRead;
    }

    public static class LastReadState {
        private String uid;
        private Long timestamp;

        public LastReadState(String uid, Long timestamp){
            this.uid = uid;
            this.timestamp = timestamp;
        }

        public String getUid() {
            return uid;
        }

        public Long getTimestamp() {
            return timestamp;
        }

        public void setUid(String uid) {
            this.uid = uid;
        }

        public void setTimestamp(Long timestamp) {
            this.timestamp = timestamp;
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy