Skip to content

Commit

Permalink
Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
ipavlidakis committed Oct 6, 2023
1 parent efdfe30 commit 4cfcf5c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions DemoApp/Sources/Views/Reactions/ReactionOverlayView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ struct ReactionOverlayView: View {
@ObservedObject var reactionsHelper = AppState.shared.reactionsHelper

var participant: CallParticipant
var availableFrame: CGSize
var availableSize: CGSize

var body: some View {
if let firstReaction = reactionsHelper.activeReactions[participant.userId]?.last {
Expand All @@ -29,7 +29,7 @@ struct ReactionOverlayView: View {
ReactionIcon(iconName: reaction.iconName).padding()
}
}
.padding(.bottom, availableFrame.height > 100 ? 44 : 8)
.padding(.bottom, availableSize.height > 100 ? 44 : 8)
.padding(.horizontal)
}
}
Expand Down Expand Up @@ -60,7 +60,7 @@ struct ReactionOverlayView_Previews: PreviewProvider {
audioLevels: [],
pin: nil
),
availableFrame: CGSize(width: 1024, height: 768)
availableSize: CGSize(width: 1024, height: 768)
)
}
}
6 changes: 3 additions & 3 deletions DemoApp/Sources/Views/Reactions/ReactionsViewModifier.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ struct ReactionsViewModifier: ViewModifier {
@ObservedObject var reactionsHelper = AppState.shared.reactionsHelper

var participant: CallParticipant
var availableFrame: CGSize
var availableSize: CGSize

func body(content: Content) -> some View {
content
.overlay(
ReactionOverlayView(participant: participant, availableFrame: availableFrame)
ReactionOverlayView(participant: participant, availableSize: availableSize)
)
.onChange(of: participant.isSpeaking) { newValue in
if newValue {
Expand Down Expand Up @@ -52,7 +52,7 @@ struct ReactionsViewModifier_Previews: PreviewProvider {
audioLevels: [],
pin: nil
),
availableFrame: .init(width: 1024, height: 768)
availableSize: .init(width: 1024, height: 768)
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ struct DemoLocalViewModifier: ViewModifier {
.modifier(
ReactionsViewModifier(
participant: localParticipant,
availableFrame: .zero
availableSize: .zero
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ struct DemoVideoCallParticipantModifier: ViewModifier {

func body(content: Content) -> some View {
content
.adjustVideoFrame(to: availableFrame.width, ratio: ratio)
.adjustVideoFrame(to: availableFrame.size.width, ratio: ratio)
.overlay(
ZStack {
BottomView(content: {
Expand Down Expand Up @@ -83,7 +83,7 @@ struct DemoVideoCallParticipantModifier: ViewModifier {
}
}
)
.modifier(ReactionsViewModifier(participant: participant, availableFrame: availableFrame.size))
.modifier(ReactionsViewModifier(participant: participant, availableSize: availableFrame.size))
.onTapGesture(count: 2, perform: {
popoverShown = true
})
Expand Down

0 comments on commit 4cfcf5c

Please sign in to comment.