Improve linking of event items #404

Merged
merged 1 commit into from Jul 21, 2013

2 participants

@koraktor

Linking is now done using a regular expression trying to find only valid positions of the text we're looking for. This is now also done in a separate method so there's less clutter with duplicate calls.

I know this might not merge cleanly anymore, because you're working on version 2.

@koraktor koraktor Improve linking of event items
Linking is now done using a regular expression trying to find only
valid positions of the text we're looking for. This is now also done
in a separate method so there's less clutter with duplicate calls.
961bfbf
@koraktor

Forgot to mention that this fixes problems like the following:

ios simulator bildschirmfoto 21 07 2013 22 24 35

@dennisreimann

Thanks, I'll need some time to check it, but I'll get back to you :)

@dennisreimann dennisreimann merged commit 3e9b21a into dennisreimann:master Jul 21, 2013

1 check passed

Details default The Travis CI build passed
@dennisreimann

Very nice, just integrated it into v2. Thanks a lot! 🍰

@dennisreimann dennisreimann was assigned Aug 3, 2013
@dennisreimann

Test

@dennisreimann dennisreimann commented on the diff Oct 8, 2013
Classes/IOCEventCell.m
@@ -63,43 +63,58 @@ - (void)setEvent:(GHEvent *)event {
[self.event addObserver:self forKeyPath:UserGravatarKeyPath options:NSKeyValueObservingOptionNew context:nil];
[self setGravatar:gravatar];
// actions
+ [self linkEventItems];
+}
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
@dennisreimann
Owner

Test on observeValueForKeyPath

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@dennisreimann dennisreimann commented on the diff Oct 9, 2013
Classes/IOCEventCell.m
@@ -63,43 +63,58 @@ - (void)setEvent:(GHEvent *)event {
[self.event addObserver:self forKeyPath:UserGravatarKeyPath options:NSKeyValueObservingOptionNew context:nil];
[self setGravatar:gravatar];
// actions
+ [self linkEventItems];
+}
+
+- (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context {
+ if ([keyPath isEqualToString:UserGravatarKeyPath] && self.event.user.gravatar) {
+ [self setGravatar:self.event.user.gravatar];
+ }
+}
+
+- (void)setContentText:(NSString *)text {
@dennisreimann
Owner

Test on setContentText

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@dennisreimann

Normal comment

@dennisreimann dennisreimann added this to the v2.3.0 milestone Dec 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment