Various fixes

This commit is contained in:
Ilya Laktyushin
2024-03-26 04:11:22 +04:00
parent abe7bc8fe2
commit 3173ac48d3
3 changed files with 198 additions and 58 deletions

View File

@@ -492,7 +492,21 @@ func contextMenuForChatPresentationInterfaceState(chatPresentationInterfaceState
return generateTintedImage(image: UIImage(bundleImageName: "Chat/Context Menu/Restrict"), color: theme.actionSheet.primaryTextColor)
}, iconSource: nil, action: { _, f in
f(.dismissWithoutContent)
controllerInteraction.navigationController()?.pushViewController(AdsReportScreen(context: context))
let _ = (context.engine.messages.reportAdMessage(peerId: message.id.peerId, opaqueId: adAttribute.opaqueId, option: nil)
|> deliverOnMainQueue).start(next: { result in
if case let .options(title, options) = result {
controllerInteraction.navigationController()?.pushViewController(
AdsReportScreen(
context: context,
peerId: message.id.peerId,
opaqueId: adAttribute.opaqueId,
title: title,
options: options
)
)
}
})
})))
actions.append(.separator)