#6 fix gallery preview after canceling a previous pick
iOS CI / Build and Test SwiftUI App (push) Canceled after 0s
Build Unsigned iOS and macOS Apps / Build Unsigned iOS IPA (push) Canceled after 0s
Build Unsigned iOS and macOS Apps / Build macOS ZIP (push) Canceled after 0s

- Stage picked media only when the picker is dismissed with a
  confirmed selection instead of on every selection change, so
  canceling restores an empty binding and never schedules a preview.
- Reset the selection binding after dismissal and recreate the picker
  via a reset token, so a stale selection can no longer leak into the
  next presentation and break its preview/send flow.
- Add verify.sh invariants for the picker state machine.
This commit is contained in:
wt committed 2026-08-29 02:17:03 +07:00
1 parent 4566b59ff1
commit b54113f0e4
2 files changed
+23 -8

No files matched your search

+8
View File
@@ -328,6 +328,14 @@ grep -q 'pendingGroupDeletion' Sources/Shared/UI/MainChatView.swift || {
echo "Chat list must offer deleting group chats"
exit 1
}
grep -q 'pickerResetToken' Sources/Shared/UI/ChatView.swift || {
echo "The photo picker must be recreated after each selection"
exit 1
}
grep -q 'let items = pickedMediaItems' Sources/Shared/UI/ChatView.swift || {
echo "Gallery staging must run on picker dismissal only"
exit 1
}
grep -q 'ArchiveSyncCursorPolicy.requestPosition' Sources/Shared/XMPP/XMPPService.swift || {
echo "MAM reconnects must prefer the durable archive UID over timestamps"
exit 1