mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-08 08:31:13 +00:00
Reaction effect in own stories
This commit is contained in:
parent
8130d9e937
commit
d5c1f37878
@ -3308,7 +3308,6 @@ final class StoryItemSetContainerSendMessage {
|
||||
return
|
||||
}
|
||||
|
||||
if component.slice.peer.id != component.context.account.peerId {
|
||||
let animateWithReactionItem: (ReactionItem) -> Void = { [weak self, weak view] reactionItem in
|
||||
guard let self, let view else {
|
||||
return
|
||||
@ -3318,7 +3317,8 @@ final class StoryItemSetContainerSendMessage {
|
||||
guard let view, let component = view.component else {
|
||||
return
|
||||
}
|
||||
if case .channel = component.slice.peer {
|
||||
if component.slice.peer.id != component.context.account.peerId {
|
||||
} else if case .channel = component.slice.peer {
|
||||
} else {
|
||||
let _ = component.context.engine.messages.setStoryReaction(peerId: component.slice.peer.id, id: component.slice.item.storyItem.id, reaction: reaction).start()
|
||||
}
|
||||
@ -3334,7 +3334,11 @@ final class StoryItemSetContainerSendMessage {
|
||||
|
||||
if let standaloneReactionAnimation = view.standaloneReactionAnimation {
|
||||
view.standaloneReactionAnimation = nil
|
||||
standaloneReactionAnimation.view.removeFromSuperview()
|
||||
|
||||
let standaloneReactionAnimationView = standaloneReactionAnimation.view
|
||||
standaloneReactionAnimation.view.layer.animateAlpha(from: 1.0, to: 0.0, duration: 0.1, removeOnCompletion: false, completion: { [weak standaloneReactionAnimationView] _ in
|
||||
standaloneReactionAnimationView?.removeFromSuperview()
|
||||
})
|
||||
}
|
||||
view.standaloneReactionAnimation = standaloneReactionAnimation
|
||||
|
||||
@ -3401,4 +3405,3 @@ final class StoryItemSetContainerSendMessage {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user