I have created a scroll bar with a list of folders created by the user like in the picture
a simple navigation link navigates inside the folder.
in order to give the option to the user to delete the folder, on the navigation view label I put an IF that change the icon of the folder base if the editing mode is on or off.
my issue is, when I'm changing the icon setting the var isEditFolderModeON = true with a long press gesture.
all working fine, problem is since I put the long press gesture in the Navigation link label it stop to work.
any solution? where I can move the long pressure gesture,
thanks
NavigationLink(destination: FolderViewAirport(fm: self.fm, dm: self.dm, folders: folder)
.onAppear(perform: {
self.fm.updateFolderData(dm: self.dm) {
}
})
) {
if self.isEditFolderModeON {
FolderBarEdit( folder: folder)
.onTapGesture {
self.fm.delateFolderTouch(nameFolder: folder)
}
}
else if self.isEditFolderModeON == false {
FolderBar(folder: folder)
.onLongPressGesture {
self.isEditFolderModeON = true
}
}
}
if I remove the .onLongPressGesture {} it works, but where I can put the self.isEditFolderModeON = true