forked from melod1n/fast-messenger
Simple attachments in messages history (#164)
* new attachments in messages history - photo, video, audio, file, link * improve attachments in messages history and adjusted font size for logo's text in auth screen * audio duration, file preview and url preview are now visible in attachments in messages history screen * make MessageBubble width adapt to attachments container width * topbar back icon crossfade animation * implement rich text for message input * handle click and long click on attachments * added click and long click handlers for attachments in message bubbles * enabled opening photos, files, and links when clicked. * implemented basic long-click logging for photos. * handled back press to return to Conversations from other tabs. * corrected the logic for filtering and selecting video images. * updated string resources for attachments, including a new "Clip" string. * make MessageBubble mention text underline on out messages
This commit is contained in:
+21
-24
@@ -47,30 +47,27 @@ fun FriendItem(
|
||||
val friendAvatar = friend.avatar?.extractUrl()
|
||||
|
||||
Box(modifier = Modifier.size(56.dp)) {
|
||||
if (friendAvatar == null) {
|
||||
Image(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.clip(CircleShape),
|
||||
painter = painterResource(id = R.drawable.ic_account_circle_cut),
|
||||
contentDescription = "Avatar",
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onBackground)
|
||||
)
|
||||
} else {
|
||||
AsyncImage(
|
||||
model = friendAvatar,
|
||||
contentDescription = null,
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.clip(CircleShape)
|
||||
.clickable {
|
||||
friend.photo400Orig
|
||||
?.extractUrl()
|
||||
?.let(onPhotoClicked)
|
||||
},
|
||||
placeholder = painterResource(id = R.drawable.ic_account_circle_cut)
|
||||
)
|
||||
}
|
||||
Image(
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.clip(CircleShape),
|
||||
painter = painterResource(id = R.drawable.ic_account_circle_cut),
|
||||
contentDescription = "Avatar",
|
||||
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onBackground)
|
||||
)
|
||||
AsyncImage(
|
||||
model = friendAvatar,
|
||||
contentDescription = null,
|
||||
modifier = Modifier
|
||||
.fillMaxSize()
|
||||
.clip(CircleShape)
|
||||
.clickable {
|
||||
friend.photo400Orig
|
||||
?.extractUrl()
|
||||
?.let(onPhotoClicked)
|
||||
},
|
||||
placeholder = painterResource(id = R.drawable.ic_account_circle_cut)
|
||||
)
|
||||
|
||||
if (friend.onlineStatus.isOnline()) {
|
||||
Box(
|
||||
|
||||
Reference in New Issue
Block a user