Merge success animation + auto-return to landing page; bump to 3.0
Build iOS App / Build .ipa and publish source (push) Successful in 23s
Build iOS App / Build .ipa and publish source (push) Successful in 23s
On a successful merge, show a brief full-screen green checkmark animation
('Merged'), then automatically pop the PR detail view back to the landing
page. MergeSheet now calls an onSuccess callback; PRDetailView shows the
overlay and dismisses after ~1.2s. Bump to 3.0.
This commit is contained in:
1 parent
5e9ee9e5cf
commit
2301b8a861
3 files changed
+47
-6
No files matched your search
@@ -65,6 +65,9 @@ struct MergeSheet: View {
|
||||
@ObservedObject var vm: PRDetailViewModel
|
||||
@Environment(\.dismiss) private var dismiss
|
||||
@State private var method = "merge"
|
||||
/// Called when the merge succeeds, so the parent can show the success
|
||||
/// animation and pop back to the landing page.
|
||||
var onSuccess: () -> Void = {}
|
||||
|
||||
private let methods = [("merge", "Create merge commit"),
|
||||
("rebase", "Rebase and merge"),
|
||||
@@ -129,7 +132,10 @@ struct MergeSheet: View {
|
||||
private func performMerge() {
|
||||
Task {
|
||||
let success = await vm.merge(method: method)
|
||||
if success { dismiss() }
|
||||
if success {
|
||||
dismiss()
|
||||
onSuccess()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user