Skip to content

Commit

Permalink
Follow up to #2325 - Prevent tighlooping between makeUIView and `up…
Browse files Browse the repository at this point in the history
…dateUIView` when creating room calls.
  • Loading branch information
stefanceriu committed Jan 25, 2024
1 parent b002951 commit 4e4c032
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
3 changes: 2 additions & 1 deletion ElementX/Sources/Screens/CallScreen/View/CallScreen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ struct CallScreen: View {

var body: some View {
WebView(url: context.viewState.url, viewModelContext: context)
.id(UUID())
// This URL is stable, forces view reloads if this representable is ever reused for another url
.id(context.viewState.url)
.ignoresSafeArea(edges: .bottom)
.presentationDragIndicator(.visible)
.environment(\.colorScheme, .dark)
Expand Down
11 changes: 5 additions & 6 deletions ElementX/Sources/Screens/Other/GenericCallLinkCoordinator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,11 @@ class GenericCallLinkCoordinator: CoordinatorProtocol {
}

func toPresentable() -> AnyView {
AnyView(
WebView(url: parameters.url)
.id(UUID())
.ignoresSafeArea(edges: .bottom)
.presentationDragIndicator(.visible)
)
AnyView(WebView(url: parameters.url)
// This URL is stable, forces view reloads if this representable is ever reused for another url
.id(parameters.url)
.ignoresSafeArea(edges: .bottom)
.presentationDragIndicator(.visible))
}
}

Expand Down

0 comments on commit 4e4c032

Please sign in to comment.