We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if (eventType && isCFNotifiction) { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveNotification:) name:eventType object:nil]; }
如果是同一个eventType 这里会进来多次 导致多次触发事件
The text was updated successfully, but these errors were encountered:
NSArray * subscribers = [self.collection objectsForKey:groupId]; if (eventType && isCFNotifiction && 0 == subscribers.count) { [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveNotification:) name:eventType object:nil]; }
改成这样?
Sorry, something went wrong.
fix issue #4: Notification Callback multi times
d8672fc
多谢反馈,你建议的方式会有线程安全的问题,我在这个commit中修复了多次回调的问题
No branches or pull requests
if (eventType && isCFNotifiction) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(receiveNotification:) name:eventType object:nil];
}
如果是同一个eventType 这里会进来多次 导致多次触发事件
The text was updated successfully, but these errors were encountered: