diff --git a/TelegramUI/ChatListItem.swift b/TelegramUI/ChatListItem.swift index 5b61823a27..b7636df3b2 100644 --- a/TelegramUI/ChatListItem.swift +++ b/TelegramUI/ChatListItem.swift @@ -709,7 +709,11 @@ class ChatListItemNode: ItemListRevealOptionsItemNode { 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) - peerLeftRevealOptions = leftRevealOptions(strings: item.presentationData.strings, theme: item.presentationData.theme, isUnread: unreadCount.unread) + if itemPeer.peerId != item.account.peerId { + peerLeftRevealOptions = leftRevealOptions(strings: item.presentationData.strings, theme: item.presentationData.theme, isUnread: unreadCount.unread) + } else { + peerLeftRevealOptions = [] + } } else { peerRevealOptions = [] peerLeftRevealOptions = [] diff --git a/TelegramUI/ChatMessageBubbleItemNode.swift b/TelegramUI/ChatMessageBubbleItemNode.swift index e7e3ab20de..0eef850a7e 100644 --- a/TelegramUI/ChatMessageBubbleItemNode.swift +++ b/TelegramUI/ChatMessageBubbleItemNode.swift @@ -387,14 +387,14 @@ class ChatMessageBubbleItemNode: ChatMessageItemView { } 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 - } 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 } } - 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 } if !needShareButton { diff --git a/TelegramUI/ItemListAvatarAndNameItem.swift b/TelegramUI/ItemListAvatarAndNameItem.swift index 97994d8b85..1e0f0c8a4a 100644 --- a/TelegramUI/ItemListAvatarAndNameItem.swift +++ b/TelegramUI/ItemListAvatarAndNameItem.swift @@ -696,7 +696,6 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite strongSelf.inputSeparator = inputSeparator } - //let title = title.prefix(255) if strongSelf.inputFirstField == nil { let inputFirstField = TextFieldNodeView() @@ -712,12 +711,12 @@ class ItemListAvatarAndNameInfoItemNode: ListViewItemNode, ItemListItemNode, Ite placeholder = item.strings.GroupInfo_ChannelListNamePlaceholder } 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.view.addSubview(inputFirstField) inputFirstField.addTarget(self, action: #selector(strongSelf.textFieldDidChange(_:)), for: .editingChanged) - } else if strongSelf.inputFirstField?.text != String(title) { - strongSelf.inputFirstField?.text = String(title) + } else if strongSelf.inputFirstField?.text != 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)) diff --git a/TelegramUI/PeerChannelMemberCategoriesContextsManager.swift b/TelegramUI/PeerChannelMemberCategoriesContextsManager.swift index a44f14d84f..20361d2895 100644 --- a/TelegramUI/PeerChannelMemberCategoriesContextsManager.swift +++ b/TelegramUI/PeerChannelMemberCategoriesContextsManager.swift @@ -189,7 +189,7 @@ final class PeerChannelMemberCategoriesContextsManager { } } |> mapToSignal { _ -> Signal in - return .complete() + return .single(Void()) } } } diff --git a/TelegramUI/PeerReportController.swift b/TelegramUI/PeerReportController.swift index c9bfb3895b..d0fb8a9b90 100644 --- a/TelegramUI/PeerReportController.swift +++ b/TelegramUI/PeerReportController.swift @@ -223,7 +223,11 @@ private func peerReportController(account: Account, subject: PeerReportSubject) if !text.isEmpty { let completed: () -> Void = { 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?() } switch subject {