Commit 735eee2e authored by Gaëtan Renaudeau's avatar Gaëtan Renaudeau

Fixes #21

parent 3cca570a
...@@ -418,22 +418,18 @@ RCT_NOT_IMPLEMENTED(-init) ...@@ -418,22 +418,18 @@ RCT_NOT_IMPLEMENTED(-init)
- (void)dispatchOnLoad - (void)dispatchOnLoad
{ {
if (_onLoad) { [_bridge.eventDispatcher sendInputEventWithName:@"load" body:@{ @"target": self.reactTag }];
[_bridge.eventDispatcher sendInputEventWithName:@"load" body:@{ @"target": self.reactTag }];
}
} }
- (void)dispatchOnProgress: (double)progress withLoaded:(int)loaded withTotal:(int)total - (void)dispatchOnProgress: (double)progress withLoaded:(int)loaded withTotal:(int)total
{ {
if (_onProgress) { NSDictionary *event =
NSDictionary *event = @{
@{ @"target": self.reactTag,
@"target": self.reactTag, @"progress": @(progress),
@"progress": @(progress), @"loaded": @(loaded),
@"loaded": @(loaded), @"total": @(total) };
@"total": @(total) }; [_bridge.eventDispatcher sendInputEventWithName:@"progress" body:event];
[_bridge.eventDispatcher sendInputEventWithName:@"progress" body:event];
}
} }
@end @end
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment