Animate the topic label if it is longer than the screen width

This commit is contained in:
Yannick Le Collen
2014-12-19 08:03:39 +01:00
parent 73d88a4f9e
commit 1e9d93be81
3 changed files with 145 additions and 0 deletions
@@ -1659,6 +1659,7 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
NSUInteger userPowerLevel = [powerLevels powerLevelOfUserWithUserID:[MatrixHandler sharedHandler].userId];
if (userPowerLevel >= [powerLevels minimumPowerLevelForPostingEventAsStateEvent:kMXEventTypeStringRoomTopic]) {
textField.backgroundColor = [UIColor whiteColor];
[self.roomTitleView stopTopicAnimation];
} else {
alertMsg = @"You are not authorized to edit this room topic";
}
@@ -1729,6 +1730,9 @@ NSString *const kCmdResetUserPowerLevel = @"/deop";
// Hide topic field if empty
_roomTitleView.hiddenTopic = !topic.length;
}
// restart the topic animation
[_roomTitleView startTopicAnimation];
}
}