diff options
author | Xin Li <delphij@google.com> | 2022-02-11 06:57:40 +0000 |
---|---|---|
committer | Xin Li <delphij@google.com> | 2022-02-11 06:57:40 +0000 |
commit | 4f64b54566c2e0bd5bdfb110cce016e00949db70 (patch) | |
tree | eec36c9282186f4987f317e2599973bf09c84358 /src/com/android/car/messenger/core/ui/conversationlist/UIConversationItem.java | |
parent | 9dc8a3cf29ad5d15edff414a1948370410c879bb (diff) | |
parent | a5b39da8eb668c61b881940b43b35366bbfd7e79 (diff) | |
download | Messenger-4f64b54566c2e0bd5bdfb110cce016e00949db70.tar.gz |
Merge sc-v2-dev-plus-aosp-without-vendor@8084891sam_222710654
Bug: 214455710
Merged-In: I65b3cfd5b9c19b744fe71d8bd6e40d33bc9045d5
Change-Id: I26d8050270490afca7a5789cfcf75ecbd69a12e3
Diffstat (limited to 'src/com/android/car/messenger/core/ui/conversationlist/UIConversationItem.java')
-rw-r--r-- | src/com/android/car/messenger/core/ui/conversationlist/UIConversationItem.java | 40 |
1 files changed, 28 insertions, 12 deletions
diff --git a/src/com/android/car/messenger/core/ui/conversationlist/UIConversationItem.java b/src/com/android/car/messenger/core/ui/conversationlist/UIConversationItem.java index bdd71e7..7381e91 100644 --- a/src/com/android/car/messenger/core/ui/conversationlist/UIConversationItem.java +++ b/src/com/android/car/messenger/core/ui/conversationlist/UIConversationItem.java @@ -28,36 +28,42 @@ public class UIConversationItem { @NonNull String mConversationId; @NonNull String mTitle; - @NonNull String mSubtitle; + @NonNull String mTextPreview; @Nullable Drawable mSubtitleIcon; - @NonNull String mReadableTime; + @NonNull String mTextMetadata; + long mLastMessageTimestamp; @Nullable Drawable mAvatar; boolean mIsMuted; boolean mShowMuteIcon; boolean mShowReplyIcon; + boolean mShowPlayIcon; boolean mUseUnreadTheme; @NonNull Conversation mConversation; public UIConversationItem( @NonNull String conversationId, @NonNull String title, - @NonNull String subtitle, + @NonNull String textPreview, @Nullable Drawable subtitleIcon, - @NonNull String readableTime, + @NonNull String textMetadata, + long lastMessageTimestamp, @Nullable Drawable avatar, boolean showMuteIcon, boolean showReplyIcon, + boolean showPlayIcon, boolean useUnreadTheme, boolean isMuted, @NonNull Conversation conversation) { this.mConversationId = conversationId; this.mTitle = title; - this.mSubtitle = subtitle; + this.mTextPreview = textPreview; this.mSubtitleIcon = subtitleIcon; - this.mReadableTime = readableTime; + this.mTextMetadata = textMetadata; + this.mLastMessageTimestamp = lastMessageTimestamp; this.mAvatar = avatar; this.mShowMuteIcon = showMuteIcon; this.mShowReplyIcon = showReplyIcon; + this.mShowPlayIcon = showPlayIcon; this.mUseUnreadTheme = useUnreadTheme; this.mIsMuted = isMuted; this.mConversation = conversation; @@ -75,10 +81,10 @@ public class UIConversationItem { return mTitle; } - /** Returns subtitle for the conversation */ + /** Returns text preview for the conversation */ @NonNull - public String getSubtitle() { - return mSubtitle; + public String getTextPreview() { + return mTextPreview; } /** @@ -90,10 +96,15 @@ public class UIConversationItem { return mSubtitleIcon; } - /** Gets the human readable time in hh::mm */ + /** Gets text metadata */ @NonNull - public String getReadableTime() { - return mReadableTime; + public String getTextMetadata() { + return mTextMetadata; + } + + /** Gets last message timestamp */ + public long getLastMessageTimestamp() { + return mLastMessageTimestamp; } /** Returns the avatar for the conversation */ @@ -117,6 +128,11 @@ public class UIConversationItem { return mShowReplyIcon; } + /** Returns true, if play icon should be shown, false otherwise */ + public boolean shouldShowPlayIcon() { + return mShowPlayIcon; + } + /** Returns true, if unread theme should be used, false otherwise */ public boolean shouldUseUnreadTheme() { return mUseUnreadTheme; |