-
Notifications
You must be signed in to change notification settings - Fork 384
Add haptics for merge results #2690
Add haptics for merge results #2690
Conversation
Update master branch
Huddie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. We're you able to test this or just assuming it should work properly?
|
I tested this feature on a test repository before sending PR. |
BasThomas
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice, two tiny things!
| number: Int, | ||
| type: IssueMergeType, | ||
| error: @escaping () -> Void | ||
| completionHandler: @escaping (Bool) -> Void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a label to this tuple, like @escaping (success: Bool) -> Void? That makes it a bit easier to understand what the Bool is referring to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BasThomas yes, you can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for bad english 😅
Do you want to fix it yourself or so that I fix it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you want to fix it, go for it!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All is ready
| error: { [weak self] in | ||
| self?.loading = false | ||
| self?.update(animated: true) | ||
| completionHandler: { [weak self] isSuccessMerge in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Super-nit: isSuccessfulMerge?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it would be better
ff6857b to
eb8d2f2
Compare
| number: Int, | ||
| type: IssueMergeType, | ||
| error: @escaping () -> Void | ||
| completionHandler: @escaping (_ success: Bool) -> Void |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do you ignore it still? That wouldn't help to understand it at the call site 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@BasThomas functional type can't have a argument label. If you ask about it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah.
I've implemented a haptic handler for a successful and unsuccessful merge results.