Skip to content

Commit

Permalink
fix(ios): remove deprecated tabgroup unselected/selected events
Browse files Browse the repository at this point in the history
BREAKING CHANGES: removes Ti.UI.TabGroup selected/unselected events in favor of focus/blur
  • Loading branch information
sgtcoolguy committed Dec 16, 2019
1 parent ef0060c commit 74f1134
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions iphone/Classes/TiUITabGroup.m
Original file line number Diff line number Diff line change
Expand Up @@ -127,12 +127,6 @@ - (void)handleDidShowTab:(TiUITabProxy *)newFocus
[event setObject:NUMINTEGER(previousIndex) forKey:@"previousIndex"];
[event setObject:NUMINTEGER(index) forKey:@"index"];

if ([self.proxy _hasListeners:@"unselected"]) {
DEPRECATED_REPLACED(@"UI.TabGroup.Event.unselected", @"5.2.0", @"UI.TabGroup.Event.blur")
[self.proxy fireEvent:@"unselected"
withObject:event];
}

if ([self.proxy _hasListeners:@"blur"]) {
[self.proxy fireEvent:@"blur" withObject:event];
}
Expand All @@ -147,12 +141,6 @@ - (void)handleDidShowTab:(TiUITabProxy *)newFocus

// If we're in the middle of opening, the focus happens once the tabgroup is opened
if (![(TiWindowProxy *)[self proxy] opening]) {
if ([self.proxy _hasListeners:@"selected"]) {
DEPRECATED_REPLACED(@"UI.TabGroup.Event.selected", @"5.2.0", @"UI.TabGroup.Event.focus")
[self.proxy fireEvent:@"selected"
withObject:event];
}

if ([self.proxy _hasListeners:@"focus"]) {
[self.proxy fireEvent:@"focus" withObject:event];
}
Expand Down Expand Up @@ -621,12 +609,6 @@ - (void)open:(id)args
index = [tabArray indexOfObject:[(TiUITabProxy *)focusedTabProxy controller]];
}
NSDictionary *event = [NSDictionary dictionaryWithObjectsAndKeys:focusedTabProxy, @"tab", NUMINTEGER(index), @"index", NUMINT(-1), @"previousIndex", [NSNull null], @"previousTab", nil];
if ([self.proxy _hasListeners:@"selected"]) {
DEPRECATED_REPLACED(@"UI.TabGroup.Event.selected", @"5.2.0", @"UI.TabGroup.Event.focus")
[self.proxy fireEvent:@"selected"
withObject:event];
}

if ([self.proxy _hasListeners:@"focus"]) {
[self.proxy fireEvent:@"focus" withObject:event];
}
Expand Down

0 comments on commit 74f1134

Please sign in to comment.