mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 20:00:38 +00:00
no message
This commit is contained in:
parent
0edc7415d7
commit
6295e0e610
@ -709,7 +709,11 @@ class ChatListItemNode: ItemListRevealOptionsItemNode {
|
|||||||
|
|
||||||
if item.enableContextActions && !isAd {
|
if item.enableContextActions && !isAd {
|
||||||
peerRevealOptions = revealOptions(strings: item.presentationData.strings, theme: item.presentationData.theme, isPinned: isPinned, isMuted: item.account.peerId != item.index.messageIndex.id.peerId ? (currentMutedIconImage != nil) : nil, hasPeerGroupId: hasPeerGroupId, canDelete: true)
|
peerRevealOptions = revealOptions(strings: item.presentationData.strings, theme: item.presentationData.theme, isPinned: isPinned, isMuted: item.account.peerId != item.index.messageIndex.id.peerId ? (currentMutedIconImage != nil) : nil, hasPeerGroupId: hasPeerGroupId, canDelete: true)
|
||||||
|
if itemPeer.peerId != item.account.peerId {
|
||||||
peerLeftRevealOptions = leftRevealOptions(strings: item.presentationData.strings, theme: item.presentationData.theme, isUnread: unreadCount.unread)
|
peerLeftRevealOptions = leftRevealOptions(strings: item.presentationData.strings, theme: item.presentationData.theme, isUnread: unreadCount.unread)
|
||||||
|
} else {
|
||||||
|
peerLeftRevealOptions = []
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
peerRevealOptions = []
|
peerRevealOptions = []
|
||||||
peerLeftRevealOptions = []
|
peerLeftRevealOptions = []
|
||||||
|
|||||||
@ -387,14 +387,14 @@ class ChatMessageBubbleItemNode: ChatMessageItemView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if let info = item.message.forwardInfo {
|
if let info = item.message.forwardInfo {
|
||||||
if let author = info.author as? TelegramUser, let _ = author.botInfo {
|
if let author = info.author as? TelegramUser, let _ = author.botInfo, !item.message.media.isEmpty && !(item.message.media.first is TelegramMediaAction) {
|
||||||
needShareButton = true
|
needShareButton = true
|
||||||
} else if let author = info.author as? TelegramChannel, case .broadcast = author.info, !(item.message.media.first is TelegramMediaAction) {
|
} else if let author = info.author as? TelegramChannel, case .broadcast = author.info {
|
||||||
needShareButton = true
|
needShareButton = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !needShareButton, let author = item.message.author as? TelegramUser, let _ = author.botInfo, !(item.message.media.first is TelegramMediaAction) {
|
if !needShareButton, let author = item.message.author as? TelegramUser, let _ = author.botInfo, !item.message.media.isEmpty && !(item.message.media.first is TelegramMediaAction) {
|
||||||
needShareButton = true
|
needShareButton = true
|
||||||
}
|
}
|
||||||
if !needShareButton {
|
if !needShareButton {
|
||||||
|
|||||||
@ -696,7 +696,6 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite
|
|||||||
strongSelf.inputSeparator = inputSeparator
|
strongSelf.inputSeparator = inputSeparator
|
||||||
}
|
}
|
||||||
|
|
||||||
//let title = title.prefix(255)
|
|
||||||
|
|
||||||
if strongSelf.inputFirstField == nil {
|
if strongSelf.inputFirstField == nil {
|
||||||
let inputFirstField = TextFieldNodeView()
|
let inputFirstField = TextFieldNodeView()
|
||||||
@ -712,12 +711,12 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite
|
|||||||
placeholder = item.strings.GroupInfo_ChannelListNamePlaceholder
|
placeholder = item.strings.GroupInfo_ChannelListNamePlaceholder
|
||||||
}
|
}
|
||||||
inputFirstField.attributedPlaceholder = NSAttributedString(string: placeholder, font: Font.regular(19.0), textColor: item.theme.list.itemPlaceholderTextColor)
|
inputFirstField.attributedPlaceholder = NSAttributedString(string: placeholder, font: Font.regular(19.0), textColor: item.theme.list.itemPlaceholderTextColor)
|
||||||
inputFirstField.attributedText = NSAttributedString(string: String(title), font: Font.regular(19.0), textColor: item.theme.list.itemPrimaryTextColor)
|
inputFirstField.attributedText = NSAttributedString(string: title, font: Font.regular(19.0), textColor: item.theme.list.itemPrimaryTextColor)
|
||||||
strongSelf.inputFirstField = inputFirstField
|
strongSelf.inputFirstField = inputFirstField
|
||||||
strongSelf.view.addSubview(inputFirstField)
|
strongSelf.view.addSubview(inputFirstField)
|
||||||
inputFirstField.addTarget(self, action: #selector(strongSelf.textFieldDidChange(_:)), for: .editingChanged)
|
inputFirstField.addTarget(self, action: #selector(strongSelf.textFieldDidChange(_:)), for: .editingChanged)
|
||||||
} else if strongSelf.inputFirstField?.text != String(title) {
|
} else if strongSelf.inputFirstField?.text != title {
|
||||||
strongSelf.inputFirstField?.text = String(title)
|
strongSelf.inputFirstField?.text = title
|
||||||
}
|
}
|
||||||
|
|
||||||
strongSelf.inputSeparator?.frame = CGRect(origin: CGPoint(x: params.leftInset + 100.0, y: 62.0), size: CGSize(width: params.width - params.leftInset - params.rightInset - 100.0, height: separatorHeight))
|
strongSelf.inputSeparator?.frame = CGRect(origin: CGPoint(x: params.leftInset + 100.0, y: 62.0), size: CGSize(width: params.width - params.leftInset - params.rightInset - 100.0, height: separatorHeight))
|
||||||
|
|||||||
@ -189,7 +189,7 @@ final class PeerChannelMemberCategoriesContextsManager {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|> mapToSignal { _ -> Signal<Void, NoError> in
|
|> mapToSignal { _ -> Signal<Void, NoError> in
|
||||||
return .complete()
|
return .single(Void())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -223,7 +223,11 @@ private func peerReportController(account: Account, subject: PeerReportSubject)
|
|||||||
if !text.isEmpty {
|
if !text.isEmpty {
|
||||||
let completed: () -> Void = {
|
let completed: () -> Void = {
|
||||||
let presentationData = account.telegramApplicationContext.currentPresentationData.with { $0 }
|
let presentationData = account.telegramApplicationContext.currentPresentationData.with { $0 }
|
||||||
presentControllerImpl?(OverlayStatusController(theme: presentationData.theme, type: .success), nil)
|
|
||||||
|
let alert = standardTextAlertController(theme: AlertControllerTheme(presentationTheme: presentationData.theme), title: nil, text: presentationData.strings.ReportPeer_AlertSuccess, actions: [TextAlertAction.init(type: TextAlertActionType.defaultAction, title: presentationData.strings.Common_OK, action: {
|
||||||
|
|
||||||
|
})])
|
||||||
|
presentControllerImpl?(alert, nil)
|
||||||
dismissImpl?()
|
dismissImpl?()
|
||||||
}
|
}
|
||||||
switch subject {
|
switch subject {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user