Skip to content

Commit

Permalink
Make sticker work again in iOS 18 (#2304)
Browse files Browse the repository at this point in the history
We should come up with a more sustainable approach.
  • Loading branch information
zeitschlag committed Oct 5, 2024
1 parent 389745e commit 7369e41
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion deltachat-ios/Chat/ChatViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7369e41

Please sign in to comment.