Skip to content

Commit

Permalink
Implement hash for MDCAlertAction.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 675753854
  • Loading branch information
Nobody authored and material-automation committed Sep 17, 2024
1 parent 444f8db commit 1c82353
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions components/Dialogs/src/MDCAlertController.m
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ - (BOOL)isEqual:(id)object {
[self.title isEqualToString:anotherAction.title] && self.emphasis == anotherAction.emphasis;
}

- (NSUInteger)hash {
return self.title.hash ^ self.emphasis;
}

@end

@interface MDCAlertController () <UITextViewDelegate>
Expand Down

0 comments on commit 1c82353

Please sign in to comment.