From 151a9b28d6de81438ef3627d9ec76db4c4a0c9b3 Mon Sep 17 00:00:00 2001 From: Aleksey Belousov Date: Thu, 11 Jun 2020 17:11:49 +0300 Subject: [PATCH] [iOS] remove extra space in bookmark section in PP --- iphone/Maps/UI/PlacePage/Views/ExpandableLabel.swift | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/iphone/Maps/UI/PlacePage/Views/ExpandableLabel.swift b/iphone/Maps/UI/PlacePage/Views/ExpandableLabel.swift index a95e2c4ae5..017135fc08 100644 --- a/iphone/Maps/UI/PlacePage/Views/ExpandableLabel.swift +++ b/iphone/Maps/UI/PlacePage/Views/ExpandableLabel.swift @@ -31,6 +31,11 @@ final class ExpandableLabel: UIView { containerText = text textView.text = text expandLabel.isHidden = true + if let text = text { + textView.isHidden = text.count == 0 + } else { + textView.isHidden = true + } } } @@ -39,6 +44,11 @@ final class ExpandableLabel: UIView { containerText = attributedText?.string textView.attributedText = attributedText expandLabel.isHidden = true + if let attributedText = attributedText { + textView.isHidden = attributedText.length == 0 + } else { + textView.isHidden = true + } } }