Android SDK - Cannot see "Subject" string in pre-existing ticket
I have a list of pre-existing tickets that I pull down from Zendesk which are of type RequestListItem which is Zendesk's code. I use this to display my pre-existing tickets, but if you look at the .class file for RequestListItem, you'll see that the Subject string is not in there:
class RequestListItem {
private final RequestInfo requestInfo;
RequestListItem(@NonNull RequestInfo requestInfo) {
this.requestInfo = requestInfo;
}
boolean isFailed() {
return CollectionUtils.isNotEmpty(this.requestInfo.getFailedMessageIds());
}
boolean isClosed() {
return this.requestInfo.isClosed();
}
boolean isUnread() {
return this.requestInfo.isUnread();
}
@NonNull
String getFirstMessage() {
return this.requestInfo.getFirstMessageInfo().getBody();
}
@NonNull
String getLastMessage() {
return this.requestInfo.getLastMessageInfo().getBody();
}
@NonNull
Date getLastUpdated() {
return this.requestInfo.getLastUpdated();
}
boolean hasAgentReplied() {
return CollectionUtils.isNotEmpty(this.requestInfo.getAgentInfos());
}
@NonNull
List<String> getLastCommentingAgentNames() {
return CollectionUtils.map(this.requestInfo.getAgentInfos(), new ZFunc1<AgentInfo, String>() {
public String apply(AgentInfo agentInfo) {
return agentInfo.getName();
}
});
}
@Nullable
String getAvatar() {
return this.hasAgentReplied() ? ((AgentInfo)this.requestInfo.getAgentInfos().get(0)).getAvatar() : "";
}
long getItemId() {
String localId = this.requestInfo.getLocalId();
String remoteId = this.requestInfo.getRemoteId();
return StringUtils.hasLength(localId) ? (long)localId.hashCode() : (long)remoteId.hashCode();
}
Builder configure(Builder configBuilder) {
return configBuilder.withRequestInfo(this.requestInfo);
}
}
Is there another way to get at a pre-existing ticket's Subject text?
Thanks!
-
Hey Eric,
What version of the SDK are you running? If I'm not mistaken RequestListItem was deprecated and replaced with RequestListActivity way back in V2.
Thanks!
Please sign in to leave a comment.
1 Comments