Skip to content

Commit 541906c

Browse files
authored
Merge pull request #55 from Trendyol/Fix/NavigationBarPopoverCrash
Disable unsaved changes tip due to crash on some devices
2 parents 747876e + c248e61 commit 541906c

File tree

1 file changed

+16
-16
lines changed

1 file changed

+16
-16
lines changed

Core/CommonViewsKit/Sources/CommonViewsKit/ChangeConfirmationViewModifier.swift

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ public struct ChangeConfirmationViewModifier: ViewModifier {
1313
@State private var presentingConfirmationDialog: Bool = false
1414
@Binding private var hasChange: Bool
1515
private var saveChanges: () -> Void
16-
private let unsavedTip = UnsavedChangesTip()
16+
// private let unsavedTip = UnsavedChangesTip()
1717

1818
public init(hasChange: Binding<Bool>, saveChanges: @escaping () -> Void) {
1919
self._hasChange = hasChange
@@ -45,23 +45,23 @@ public struct ChangeConfirmationViewModifier: ViewModifier {
4545
if hasChange {
4646
Label("Unsaved", systemImage: "smallcircle.filled.circle.fill")
4747
.help("Unsaved Changes")
48-
.popoverTip(unsavedTip)
48+
// .popoverTip(unsavedTip)
4949
}
5050
}
5151
}
5252
}
5353
}
54-
55-
struct UnsavedChangesTip: Tip {
56-
var title: Text {
57-
Text("Unsaved Changes")
58-
}
59-
60-
var message: Text? {
61-
Text("You can save or discard them")
62-
}
63-
64-
var image: Image? {
65-
Image(systemName: "pencil.and.outline")
66-
}
67-
}
54+
/// removed due to crash, can investigate later.
55+
//struct UnsavedChangesTip: Tip {
56+
// var title: Text {
57+
// Text("Unsaved Changes")
58+
// }
59+
//
60+
// var message: Text? {
61+
// Text("You can save or discard them")
62+
// }
63+
//
64+
// var image: Image? {
65+
// Image(systemName: "pencil.and.outline")
66+
// }
67+
//}

0 commit comments

Comments
 (0)