java.lang.Object | ||
↳ | ViewModel | |
↳ | com.pdftron.collab.ui.reply.component.ReplyUIViewModel |
ViewModel containing data required by the reply dialog, such as the list of messages, the header, text input field, and the current user.
The ReplyUIViewModel
object will be reused and reinitialized for every reply dialog pertaining to a
specific annotation in the document viewer.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
ReplyUIViewModel() |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
getEditCommentLiveData()
Similar to
getWriteMessageLiveData() , however returns a LiveData< ReplyInput >
that calls its observers when ever there is a change in the comment edit text input field. | ||||||||||
|
getEditMessageLiveData()
Similar to
getWriteMessageLiveData() , however returns a LiveData< ReplyInput >
that calls its observers when ever there is a change in the new message edit text input field. | ||||||||||
|
getHeaderLiveData()
Returns a LiveData< ReplyHeader > that calls its observers when the header information
has changed.
| ||||||||||
|
getHeaderObservable() | ||||||||||
|
getMessagesLiveData()
Returns a LiveData< ReplyMessages > that calls its observers when the list of messages/
comments have changed.
| ||||||||||
|
getMessagesObservable() | ||||||||||
int |
getPage()
Returns the current page of the annotation that this
ReplyUIViewModel represents. | ||||||||||
User |
getUser()
Returns the current
User . | ||||||||||
|
getWriteMessageLiveData()
Returns a LiveData< ReplyInput > that calls its observers when ever there is a change
in the new message edit text input field.
| ||||||||||
|
getWriteMessageObservable() | ||||||||||
void |
set(ReplyHeader replyHeader, ReplyMessages replyMessages, User user, int page)
Initialize the data in the
ReplyUIViewModel . | ||||||||||
void |
setHasUnreadReplies(boolean hasUnreadReplies)
Updates the notification flag in the LiveData containing the reply header data.
| ||||||||||
void |
setMessages(List<ReplyMessage> newMessages)
Updates the LiveData containing the reply messages with a new list of comments/messages.
| ||||||||||
void |
setParentAnnotation(AnnotationEntity parentAnnot)
Updates the parent annotation associated with the reply header.
| ||||||||||
void |
setParentAnnotationContent(String content)
Updates the parent annotation's content.
| ||||||||||
void |
setReviewState(AnnotReviewState reviewState)
Updates the review state in the LiveData containing the reply header data.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
|
Similar to getWriteMessageLiveData()
, however returns a LiveData< ReplyInput >
that calls its observers when ever there is a change in the comment edit text input field.
Similar to getWriteMessageLiveData()
, however returns a LiveData< ReplyInput >
that calls its observers when ever there is a change in the new message edit text input field.
Returns a LiveData< ReplyHeader > that calls its observers when the header information has changed. It is used internally to initialize the view state, but can be used externally to listen to header state changes. Currently observers are only notified when replies have changed (i.e. the notification icon) and preview changes are not supported.
Returns a LiveData< ReplyMessages > that calls its observers when the list of messages/ comments have changed. It is used internally to initialize the view state, but can also be used externally to listen to message list changes.
Returns the current page of the annotation that this ReplyUIViewModel
represents.
Returns a LiveData< ReplyInput > that calls its observers when ever there is a change in the new message edit text input field.
Initialize the data in the ReplyUIViewModel
. Data usually comes from the current
selected annotation.
replyHeader | contains the annotation information to be displayed |
---|---|
replyMessages | contains the reply message to be displayed |
user | contains information about the current user (used to edit and write comments) |
page | current page of the annotation that this view model describes |
Updates the notification flag in the LiveData containing the reply header data.
hasUnreadReplies | whether there are any unread replies/comments |
---|
Updates the LiveData containing the reply messages with a new list of comments/messages.
newMessages | used to update the view model. |
---|
Updates the parent annotation associated with the reply header.
parentAnnot | containing the parent annotation information. |
---|
Updates the parent annotation's content.
content | the content |
---|
Updates the review state in the LiveData containing the reply header data.
reviewState | the review state of the reply |
---|