Use the environment's supportsMultipleWindows instead of UIDevice.current.isPhone

This commit is contained in:
Stefan Ceriu
2026-03-31 15:38:48 +03:00
committed by Stefan Ceriu
parent 256cc5c35a
commit bbc27d17ec

View File

@@ -9,6 +9,8 @@
import SwiftUI
struct HomeScreenRoomList: View {
@Environment(\.supportsMultipleWindows) private var supportsMultipleWindows
@ObservedObject var context: HomeScreenViewModel.Context
var body: some View {
@@ -38,7 +40,7 @@ struct HomeScreenRoomList: View {
context.send(viewAction: .detachRoom(roomIdentifier: room.id))
})
.contextMenu {
if !UIDevice.current.isPhone {
if supportsMultipleWindows {
Button {
context.send(viewAction: .detachRoom(roomIdentifier: room.id))
} label: {