feat: Added duration info in Shared Voices tab
Co-authored-by: 23rd <23rd@vivaldi.net>
This commit is contained in:
parent
b20013e555
commit
1acd794d7c
@ -198,8 +198,9 @@ public class SharedAudioCell extends FrameLayout implements DownloadController.F
|
||||
captionLayoutEmojis = AnimatedEmojiSpan.update(AnimatedEmojiDrawable.CACHE_TYPE_MESSAGES, this, captionLayoutEmojis, captionLayout);
|
||||
}
|
||||
try {
|
||||
if (viewType == VIEW_TYPE_GLOBAL_SEARCH && (currentMessageObject.isVoice() || currentMessageObject.isRoundVideo())) {
|
||||
if (/*viewType == VIEW_TYPE_GLOBAL_SEARCH && */(currentMessageObject.isVoice() || currentMessageObject.isRoundVideo())) {
|
||||
CharSequence duration = AndroidUtilities.formatDuration((int) currentMessageObject.getDuration(), false);
|
||||
duration = duration + " / " + currentMessageObject.getMusicAuthor().replace('\n', ' ');
|
||||
TextPaint paint = viewType == VIEW_TYPE_GLOBAL_SEARCH ? description2TextPaint : Theme.chat_contextResult_descriptionTextPaint;
|
||||
duration = TextUtils.ellipsize(duration, paint, maxWidth, TextUtils.TruncateAt.END);
|
||||
descriptionLayout = new StaticLayout(duration, paint, maxWidth + AndroidUtilities.dp(4), Layout.Alignment.ALIGN_NORMAL, 1.0f, 0.0f, false);
|
||||
|
Loading…
Reference in New Issue
Block a user