Skip to content

Commit 8b5e185

Browse files
authored
Fix insets when using TGNoCard (#16)
1 parent 440c3de commit 8b5e185

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Sources/TGCardViewController/TGCardViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ open class TGCardViewController: UIViewController {
579579

580580
if cardIsNextToMap(in: traitCollection) {
581581
// The map is to the right of the card, which we account for when not collapsed
582-
let ignoreCard = position == .collapsed && traitCollection.verticalSizeClass == .regular
582+
let ignoreCard = (position == .collapsed && traitCollection.verticalSizeClass == .regular) || cardWrapperShadow.isHidden
583583
left = ignoreCard ? 0 : cardWrapperShadow.frame.maxX
584584
bottom = 0
585585
top = topOverlap

0 commit comments

Comments
 (0)