mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-04-17 20:08:31 +00:00
Fix bottom sheets
This commit is contained in:
parent
43ebb20646
commit
1ab630c0f5
5 changed files with 4 additions and 70 deletions
|
|
@ -41,7 +41,7 @@ struct ContactFragment: View {
|
|||
contactInnerContent(contactsListViewModel: contactsListViewModel)
|
||||
.sheet(isPresented: $showingSheet) {
|
||||
ContactListBottomSheet(contactsListViewModel: contactsListViewModel, showingSheet: $showingSheet)
|
||||
.presentationDetents([.fraction(0.2)])
|
||||
.presentationDetents([.fraction(0.1)])
|
||||
}
|
||||
.sheet(isPresented: $showShareSheet) {
|
||||
ShareSheet(friendToShare: contactAvatarModel)
|
||||
|
|
|
|||
|
|
@ -87,73 +87,6 @@ struct ContactListBottomSheet: View {
|
|||
}
|
||||
.padding(.horizontal, 30)
|
||||
.background(Color.gray100)
|
||||
|
||||
VStack {
|
||||
Divider()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
if contactsListViewModel.stringToCopy.prefix(4) != "sip:" {
|
||||
Button {
|
||||
if #available(iOS 16.0, *) {
|
||||
if idiom != .pad {
|
||||
showingSheet.toggle()
|
||||
} else {
|
||||
showingSheet.toggle()
|
||||
dismiss()
|
||||
}
|
||||
} else {
|
||||
showingSheet.toggle()
|
||||
dismiss()
|
||||
}
|
||||
} label: {
|
||||
HStack {
|
||||
Image("envelope-simple-open")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
.padding(.all, 10)
|
||||
Text("menu_invite")
|
||||
.default_text_style(styleSize: 16)
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxHeight: .infinity)
|
||||
}
|
||||
.padding(.horizontal, 30)
|
||||
.background(Color.gray100)
|
||||
|
||||
VStack {
|
||||
Divider()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
}
|
||||
|
||||
Button {
|
||||
if #available(iOS 16.0, *) {
|
||||
showingSheet.toggle()
|
||||
} else {
|
||||
showingSheet.toggle()
|
||||
dismiss()
|
||||
}
|
||||
} label: {
|
||||
HStack {
|
||||
Image("x-circle")
|
||||
.renderingMode(.template)
|
||||
.resizable()
|
||||
.foregroundStyle(Color.grayMain2c500)
|
||||
.frame(width: 25, height: 25, alignment: .leading)
|
||||
.padding(.all, 10)
|
||||
Text(contactsListViewModel.stringToCopy.prefix(4) == "sip:"
|
||||
? "menu_block_address" : "menu_block_number")
|
||||
.default_text_style(styleSize: 16)
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxHeight: .infinity)
|
||||
}
|
||||
.padding(.horizontal, 30)
|
||||
.background(Color.gray100)
|
||||
|
||||
}
|
||||
.onRotate { newOrientation in
|
||||
orientation = newOrientation
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ struct ContactsFragment: View {
|
|||
showingSheet: $showingSheet,
|
||||
showShareSheet: $showShareSheet
|
||||
)
|
||||
.presentationDetents([.fraction(0.2)])
|
||||
.presentationDetents([.fraction(0.3)])
|
||||
}
|
||||
.sheet(isPresented: $showShareSheet) {
|
||||
ShareSheet(friendToShare: contactsListViewModel.selectedFriendToShare!)
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ struct ContactsListBottomSheet: View {
|
|||
}
|
||||
|
||||
Spacer()
|
||||
|
||||
Button {
|
||||
self.contactsListViewModel.toggleStarredSelectedFriend()
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ struct HistoryFragment: View {
|
|||
isShowEditContactFragment: $isShowEditContactFragment,
|
||||
isShowEditContactFragmentAddress: $isShowEditContactFragmentAddress
|
||||
)
|
||||
.presentationDetents([.fraction(0.2)])
|
||||
.presentationDetents([.fraction(0.3)])
|
||||
}
|
||||
} else {
|
||||
HistoryListFragment(showingSheet: $showingSheet, text: $text)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue