Skip to content

113 story 1 22 fix view dismiss on swipe roomtabview#130

Merged
mmc03-ucb merged 2 commits intomainfrom
113-story-1-22-Fix-view-dismiss-on-swipe-roomtabview
Dec 9, 2025
Merged

113 story 1 22 fix view dismiss on swipe roomtabview#130
mmc03-ucb merged 2 commits intomainfrom
113-story-1-22-Fix-view-dismiss-on-swipe-roomtabview

Conversation

@mmc03-ucb
Copy link
Contributor

Simulator.Screen.Recording.-.iPhone.17.Pro.-.2025-11-26.at.11.58.08.mov

@mmc03-ucb mmc03-ucb requested a review from xleonx0x November 26, 2025 01:01
@mmc03-ucb
Copy link
Contributor Author

Closes #113

Comment on lines 37 to 45
.sheet(isPresented: $showDetails) {
RoomDetailsSheetView(room: room, roomViewModel: roomViewModel)
.presentationDetents([.fraction(0.65), .fraction(0.75), .large], selection: $detent)
.presentationBackgroundInteraction(.enabled(upThrough: .large))
.presentationCornerRadius(30)
RoomDetailsSheetView(room: room, roomViewModel: roomViewModel) {
showDetails = false
dismiss()
}
.presentationDetents([.fraction(0.65), .fraction(0.75), .large], selection: $detent)
.presentationBackgroundInteraction(.enabled(upThrough: .large))
.presentationCornerRadius(30)
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the sheet dismissal can be solved by adding this one line .interactiveDismissDisabled(true) to the sheet, as seen below.

.sheet(isPresented: $showDetails) {
      RoomDetailsSheetView(room: room)
        .environment(roomViewModel)
        .presentationDetents([.fraction(0.65), .fraction(0.75), .large], selection: $detent)
        .presentationBackgroundInteraction(.enabled(upThrough: .large))
        .presentationCornerRadius(30)
        .interactiveDismissDisabled(true)
    }

Remove the rest of the redundant code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screen.Recording.2025-11-27.at.9.27.21.AM.mov

Doesn't work on my end.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh my bad Muqueet. I misunderstood the ticket. but could u still leave this part in?

.sheet(isPresented: $showDetails) {
      RoomDetailsSheetView(room: room)
        .environment(roomViewModel)
        .presentationDetents([.fraction(0.65), .fraction(0.75), .large], selection: $detent)
        .presentationBackgroundInteraction(.enabled(upThrough: .large))
        .presentationCornerRadius(30)
        .interactiveDismissDisabled(true)
    }

It prevents the user from swiping down to dismiss just the sheet. Otherwise the pr lgtm!

Copy link
Contributor

@xleonx0x xleonx0x left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approving since yanlin said lgtm

Copy link
Collaborator

@Yalilix Yalilix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mmc03-ucb mmc03-ucb merged commit 6e3105b into main Dec 9, 2025
3 checks passed
@xleonx0x xleonx0x deleted the 113-story-1-22-Fix-view-dismiss-on-swipe-roomtabview branch February 19, 2026 00:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants