aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTeddy Wing2018-08-21 06:07:13 +0200
committerTeddy Wing2018-08-21 06:07:13 +0200
commit367a5ec9f9f1623bcb2761682066b9d52c4fd41e (patch)
tree7ca82ebfd457f7a9ffdda0f5753da406812d179c
parent9ebf6a1461f6322691abc5f6547fcf6eb6f2dae4 (diff)
downloadDomeKey-367a5ec9f9f1623bcb2761682066b9d52c4fd41e.tar.bz2
HeadphoneKey: Rename `maybeRunAction` to `runAction`
As alluded to in 8b94ca51e7ef431c476d1c500f36157a976186f0, since we cancel the `performSelector` in `handleDeadKey:`, this method doesn't "maybe" anything, it should always run the action.
-rw-r--r--DomeKey/HeadphoneKey.h2
-rw-r--r--DomeKey/HeadphoneKey.m6
2 files changed, 4 insertions, 4 deletions
diff --git a/DomeKey/HeadphoneKey.h b/DomeKey/HeadphoneKey.h
index c1b8e85..59c2b49 100644
--- a/DomeKey/HeadphoneKey.h
+++ b/DomeKey/HeadphoneKey.h
@@ -28,6 +28,6 @@ static const unsigned int TIMEOUT_MILLISECONDS = 1000;
}
- (void)handleDeadKey:(HeadphoneButton)button;
-- (void)maybeRunAction;
+- (void)runAction;
@end
diff --git a/DomeKey/HeadphoneKey.m b/DomeKey/HeadphoneKey.m
index d5fdb8d..1d815b2 100644
--- a/DomeKey/HeadphoneKey.m
+++ b/DomeKey/HeadphoneKey.m
@@ -54,16 +54,16 @@
[_key_buffer addObject:storable_button];
[NSObject cancelPreviousPerformRequestsWithTarget:self
- selector:@selector(maybeRunAction)
+ selector:@selector(runAction)
object:nil];
NSTimeInterval timeout_seconds = TIMEOUT_MILLISECONDS / 1000.0;
- [self performSelector:@selector(maybeRunAction)
+ [self performSelector:@selector(runAction)
withObject:nil
afterDelay:timeout_seconds];
}
-- (void)maybeRunAction
+- (void)runAction
{
NSLog(@"%@", _key_buffer);