lib/ios/sugarcube-animations/animation_chain.rb in sugarcube-2.12.1 vs lib/ios/sugarcube-animations/animation_chain.rb in sugarcube-2.12.2
- old
+ new
@@ -42,24 +42,24 @@
def do_next
return nil if @block_index >= @blocks.length
options, block = @blocks[@block_index]
- @after_block = ->(completed){
+ @after_block = ->(completed) do
if @abort || ! self.do_next
@running = false
if @loop
start
else
AnimationChain.stop_chain(self)
end
end
- }.weak!
+ end.weak!
options[:after] = @after_block
UIView.animate(options) do
Thread.current[:sugarcube_chaining] = true
- block.call
+ block.call if block
Thread.current[:sugarcube_chaining] = nil
@block_index += 1
end
true
end