Skip to content

Commit 0699602

Browse files
author
Isaac
committed
Fix
1 parent 7fe2c54 commit 0699602

File tree

1 file changed

+10
-7
lines changed

1 file changed

+10
-7
lines changed

submodules/TelegramUI/Components/ShareWithPeersScreen/Sources/ShareWithPeersScreen.swift

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,8 @@ final class ShareWithPeersScreenComponent: Component {
18241824
sectionOffset += footerSize.height
18251825
} else if section.id == 4 && section.itemCount > 0 {
18261826
var sectionItemOffset: CGFloat = 0.0
1827-
if self.selectedOptions.contains(.pin) {
1827+
//TODO:release
1828+
if self.selectedOptions.contains(.pin) && !"".isEmpty {
18281829
let itemFrame = CGRect(origin: CGPoint(x: itemLayout.sideInset, y: sectionOffset + section.insets.top + sectionItemOffset), size: CGSize(width: itemLayout.containerSize.width, height: section.itemHeight))
18291830
if !visibleBounds.intersects(itemFrame) {
18301831
continue
@@ -2724,12 +2725,14 @@ final class ShareWithPeersScreenComponent: Component {
27242725
/*if self.selectedOptions.contains(.pin) {
27252726
itemCount += 1
27262727
}*/
2727-
sections.append(ItemLayout.Section(
2728-
id: 4,
2729-
insets: UIEdgeInsets(top: 28.0, left: 0.0, bottom: 0.0, right: 0.0),
2730-
itemHeight: optionItemSize.height,
2731-
itemCount: 1
2732-
))
2728+
if itemCount != 0 {
2729+
sections.append(ItemLayout.Section(
2730+
id: 4,
2731+
insets: UIEdgeInsets(top: 28.0, left: 0.0, bottom: 0.0, right: 0.0),
2732+
itemHeight: optionItemSize.height,
2733+
itemCount: itemCount
2734+
))
2735+
}
27332736
}
27342737
} else {
27352738
sections.append(ItemLayout.Section(

0 commit comments

Comments
 (0)