Skip to content

Commit

Permalink
Rename controller:isSuspended to make it clearer that it's notifying …
Browse files Browse the repository at this point in the history
…about a state change. (project-chip#35577)
  • Loading branch information
bzbarsky-apple authored Sep 13, 2024
1 parent 7789409 commit 236908d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/darwin/Framework/CHIP/MTRDeviceController.mm
Original file line number Diff line number Diff line change
Expand Up @@ -385,8 +385,8 @@ - (void)_notifyDelegatesOfSuspendState
{
BOOL isSuspended = [self isSuspended];
[self _callDelegatesWithBlock:^(id<MTRDeviceControllerDelegate> delegate) {
if ([delegate respondsToSelector:@selector(controller:isSuspended:)]) {
[delegate controller:self isSuspended:isSuspended];
if ([delegate respondsToSelector:@selector(controller:suspendedChangedTo:)]) {
[delegate controller:self suspendedChangedTo:isSuspended];
}
} logString:__PRETTY_FUNCTION__];
}
Expand Down
2 changes: 1 addition & 1 deletion src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4))
* the controller will be in the specified state.
*/
- (void)controller:(MTRDeviceController *)controller
isSuspended:(BOOL)suspended MTR_NEWLY_AVAILABLE;
suspendedChangedTo:(BOOL)suspended MTR_NEWLY_AVAILABLE;
@end

typedef NS_ENUM(NSUInteger, MTRPairingStatus) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ - (id)initWithExpectation:(XCTestExpectation *)expectation expectedSuspensionSta
}

- (void)controller:(MTRDeviceController *)controller
isSuspended:(BOOL)suspended
suspendedChangedTo:(BOOL)suspended
{
XCTAssertEqual(suspended, self.expectedSuspensionState);
[self.expectation fulfill];
Expand Down

0 comments on commit 236908d

Please sign in to comment.