Skip to content

Commit

Permalink
Merge pull request #14 from jaesung-0o0/bugfix/jaesung/fix-date-view
Browse files Browse the repository at this point in the history
Bug-fix on `MessageDateView/date`
  • Loading branch information
x-0o0 authored Mar 9, 2023
2 parents e554e8b + 0694768 commit d33e972
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/ChatUI/ChatInChannel/MessageDateView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public struct MessageDateView<MessageType: MessageProtocol>: View {
}

public init(message: MessageType) {
self.date = Date(timeIntervalSince1970: message.sentAt / 1000)
self.date = Date(timeIntervalSince1970: message.sentAt)
}
}

Expand Down
2 changes: 1 addition & 1 deletion Sources/ChatUI/ChatInChannel/MessageList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public struct MessageList<MessageType: MessageProtocol & Identifiable, RowConten
// presenting view as an overlay, so that it will look like custom context
VStack(alignment: configuration.userID == highlightMessage.sender.id ? .trailing : .leading, spacing: 0) {
// MARK: Message Reaction
if highlightMessage.readReceipt == .seen {
if highlightMessage.readReceipt == .seen, !reactionItems.isEmpty {
ReactionSelector(isPresented: $isMessageMenuPresented, message: highlightMessage, items: reactionItems) { reactionItem in
// MARK: Close Highlight
withAnimation(.easeInOut) {
Expand Down

0 comments on commit d33e972

Please sign in to comment.