From 166fbff26c1fc7df7b05be85ddafa2addef3ab9e Mon Sep 17 00:00:00 2001 From: Ryan Zhao Date: Wed, 2 Feb 2022 11:32:37 +1100 Subject: [PATCH] improve selected message animation for global search --- .../Conversations/Message Cells/VisibleMessageCell.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Session/Conversations/Message Cells/VisibleMessageCell.swift b/Session/Conversations/Message Cells/VisibleMessageCell.swift index 233e98d57..0a9755acf 100644 --- a/Session/Conversations/Message Cells/VisibleMessageCell.swift +++ b/Session/Conversations/Message Cells/VisibleMessageCell.swift @@ -477,9 +477,11 @@ final class VisibleMessageCell : MessageCell, LinkPreviewViewDelegate { } func highlight() { - bubbleView.setShadow(radius: 6, opacity: 1, offset: .zero, color: Colors.accent.cgColor) + let shawdowColour = isLightMode ? UIColor.black.cgColor : Colors.accent.cgColor + let opacity : Float = isLightMode ? 0.5 : 1 + bubbleView.setShadow(radius: 10, opacity: opacity, offset: .zero, color: shawdowColour) DispatchQueue.main.async { - UIView.animate(withDuration: 2) { + UIView.animate(withDuration: 1.6) { self.bubbleView.setShadow(radius: 0, opacity: 0, offset: .zero, color: UIColor.clear.cgColor) } }