Tag
Tag info (rich model).
represents a tag complete Info, and Provides based on When before tag Instance Operation Method. design See com.nexconn.chat.channel.BaseChannel rich model pattern: model Object both holds Data, Also Provides Operation Method, Operation delegates to TagAdapter.
Via Tag.getTags Get Tag Instance after, can directly Call Instance Method perform Operation.
Usage Example:
// Create tag
Tag.createTag(CreateTagParams("tag001", "Important")) { tag, error ->
if (error == null && tag != null) { /* Created successfully */}
}
// 获取所有标签
Tag.getTags { tags, error ->
val tag = tags?.first() ?: return@getTags
// 更新标签名称
tag.update(UpdateTagParams("新名称")) { error -> ... }
// 添加频道到标签
tag.addChannels(listOf(
ChannelIdentifier(ChannelType.DIRECT, "userId1")
)) { error -> ... }
// 获取标签下未读数
tag.getUnreadCount { count, error -> ... }
// 删除标签
tag.delete { error -> ... }
}Parameters
标签唯一标识,长度不超过 10 个字
标签名称,长度不超过 15 个字,名称可以重复
Properties
Functions
Convert channel Add to When before tag.
Clear When before tag all under channel.
Clear When before tag all under channel message Unread Status.
Create When before tag under Channel list Pagination query object.
Delete When before tag.
Convert channel From When before tag Remove.
match conversation count
create time
Get When before tag under Unread message count.
match conversation count
create time
Update When before Tag info.