fix(gift): 취소 완료 후 제출 상태를 해제한다
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
||||
ruby - "$root" <<'RUBY'
|
||||
root = ARGV.fetch(0)
|
||||
source = File.read(File.join(root, 'SodaLive/Sources/V2/Gift/Detail/GiftDetailViewModel.swift'))
|
||||
.gsub(%r{"(?:\\.|[^"\\])*"|//[^\n]*|/\*.*?\*/}m) { |token| token.start_with?('"') ? token : '' }
|
||||
.gsub(/\s+/, ' ').gsub(/\s*([(),:])\s*/, '\1').strip
|
||||
|
||||
completion = source[/self\.onCanceled\(self\.applicationNo\)\s*\{ \[weak self\] didReplace in (.*?) self\.fetch\(\)\s*\}/, 1]
|
||||
abort 'RED gift-detail cancel loading: cancellation completion block not found' unless completion
|
||||
|
||||
reset = completion.index('self.isCancelSubmitting = false')
|
||||
successful_return = completion.index('guard !didReplace else { return }')
|
||||
unless reset && successful_return && reset < successful_return
|
||||
abort 'RED gift-detail cancel loading: successful replacement must clear isCancelSubmitting before returning'
|
||||
end
|
||||
|
||||
puts 'PASS gift-detail cancel loading: successful replacement clears submission state'
|
||||
RUBY
|
||||
Reference in New Issue
Block a user