Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Send stickers on iOS 18 #2306

Merged
merged 2 commits into from
Oct 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Make sticker work again in iOS 18 (#2304)
We should come up with a more sustainable approach.
zeitschlag committed Sep 27, 2024
commit a3d2ae7d5db55b3a4cacef73f8c912ed6f876fa9
5 changes: 4 additions & 1 deletion deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
@@ -2747,7 +2747,10 @@ extension ChatViewController: UITextViewDelegate {
// MARK: - ChatInputTextViewPasteDelegate
extension ChatViewController: ChatInputTextViewPasteDelegate {
func onImagePasted(image: UIImage) {
let isSticker = image.size.equalTo(CGSize(width: 140, height: 140))

let preiOS18StickerSize = CGSize(width: 140, height: 140)
let iOS18StickerSize = CGSize(width: 160, height: 160)
let isSticker = image.size.equalTo(preiOS18StickerSize) || image.size.equalTo(iOS18StickerSize)

if isSticker {
sendSticker(image)