mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-25 16:22:13 +00:00
* ios: block members (WIP) * CIBlocked, blocking api * show item as blocked * show blocked and merge multiple deleted items * update block icons * split sent and received deleted to two categories * merge chat feature items, refactor CIMergedRange * merge feature items, two profile images and names on merged items * ensure range is withing chat items range * merge group events * fix/refactor * make group member changes observable * exclude some group events from merging * fix states not updating and other fixes * load list of members when tapping profile * refactor * fix incorrect merging of sent/received marked deleted * fix incorrect expand/hide on single moderated items without content * load members list when opening member via item * comments * fix member counting in case of name collision
42 lines
1.2 KiB
Swift
42 lines
1.2 KiB
Swift
//
|
|
// DeletedItemView.swift
|
|
// SimpleX
|
|
//
|
|
// Created by JRoberts on 04/02/2022.
|
|
// Copyright © 2022 SimpleX Chat. All rights reserved.
|
|
//
|
|
|
|
import SwiftUI
|
|
import SimpleXChat
|
|
|
|
struct DeletedItemView: View {
|
|
@Environment(\.colorScheme) var colorScheme
|
|
@ObservedObject var chat: Chat
|
|
var chatItem: ChatItem
|
|
|
|
var body: some View {
|
|
HStack(alignment: .bottom, spacing: 0) {
|
|
Text(chatItem.content.text)
|
|
.foregroundColor(.secondary)
|
|
.italic()
|
|
CIMetaView(chat: chat, chatItem: chatItem)
|
|
.padding(.horizontal, 12)
|
|
}
|
|
.padding(.leading, 12)
|
|
.padding(.vertical, 6)
|
|
.background(chatItemFrameColor(chatItem, colorScheme))
|
|
.cornerRadius(18)
|
|
.textSelection(.disabled)
|
|
}
|
|
}
|
|
|
|
struct DeletedItemView_Previews: PreviewProvider {
|
|
static var previews: some View {
|
|
Group {
|
|
DeletedItemView(chat: Chat.sampleData, chatItem: ChatItem.getDeletedContentSample())
|
|
DeletedItemView(chat: Chat.sampleData, chatItem: ChatItem.getDeletedContentSample(dir: .groupRcv(groupMember: GroupMember.sampleData)))
|
|
}
|
|
.previewLayout(.fixed(width: 360, height: 200))
|
|
}
|
|
}
|