mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
Use the environment's supportsMultipleWindows instead of UIDevice.current.isPhone
This commit is contained in:
committed by
Stefan Ceriu
parent
2277d0deae
commit
a39c150ec7
@@ -9,6 +9,8 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct HomeScreenRoomList: View {
|
struct HomeScreenRoomList: View {
|
||||||
|
@Environment(\.supportsMultipleWindows) private var supportsMultipleWindows
|
||||||
|
|
||||||
@ObservedObject var context: HomeScreenViewModel.Context
|
@ObservedObject var context: HomeScreenViewModel.Context
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
@@ -38,7 +40,7 @@ struct HomeScreenRoomList: View {
|
|||||||
context.send(viewAction: .detachRoom(roomIdentifier: room.id))
|
context.send(viewAction: .detachRoom(roomIdentifier: room.id))
|
||||||
})
|
})
|
||||||
.contextMenu {
|
.contextMenu {
|
||||||
if !UIDevice.current.isPhone {
|
if supportsMultipleWindows {
|
||||||
Button {
|
Button {
|
||||||
context.send(viewAction: .detachRoom(roomIdentifier: room.id))
|
context.send(viewAction: .detachRoom(roomIdentifier: room.id))
|
||||||
} label: {
|
} label: {
|
||||||
|
|||||||
Reference in New Issue
Block a user