Broke reference cycle in FRPLoginViewModel.

This commit is contained in:
Ash Furrow
2013-10-22 20:29:02 -04:00
parent 0b494048ef
commit f184e9fa34

View File

@@ -21,9 +21,11 @@
self = [super init];
if (!self) return nil;
@weakify(self);
self.loginCommand = [[RACCommand alloc] initWithEnabled:[RACSignal combineLatest:@[RACObserve(self, username), RACObserve(self, password)] reduce:^id(NSString *username, NSString *password){
return @(username.length > 0 && password.length > 0);
}] signalBlock:^RACSignal *(id input) {
@strongify(self);
return [FRPPhotoImporter logInWithUsername:self.username password:self.password];
}];