diff --git a/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/Contents.json b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/Contents.json index 8d7bcd9ce..4e597c1e4 100644 --- a/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/Contents.json +++ b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/Contents.json @@ -19,8 +19,5 @@ "info" : { "author" : "xcode", "version" : 1 - }, - "properties" : { - "template-rendering-intent" : "template" } } diff --git a/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/scrolldown.png b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/scrolldown.png index ac61fd1ea..4e639fb9b 100644 Binary files a/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/scrolldown.png and b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/scrolldown.png differ diff --git a/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/scrolldown@2x.png b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/scrolldown@2x.png index 490d720c2..aabb2b121 100644 Binary files a/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/scrolldown@2x.png and b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/scrolldown@2x.png differ diff --git a/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/scrolldown@3x.png b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/scrolldown@3x.png index cd5dba5f1..81685ed6b 100644 Binary files a/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/scrolldown@3x.png and b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown.imageset/scrolldown@3x.png differ diff --git a/Riot/Assets/Images.xcassets/Room/Activities/scrolldown_dark.imageset/Contents.json b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown_dark.imageset/Contents.json new file mode 100644 index 000000000..6dc294359 --- /dev/null +++ b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown_dark.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "scrolldown_dark.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "scrolldown_dark@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "scrolldown_dark@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Riot/Assets/Images.xcassets/Room/Activities/scrolldown_dark.imageset/scrolldown_dark.png b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown_dark.imageset/scrolldown_dark.png new file mode 100644 index 000000000..740a562f4 Binary files /dev/null and b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown_dark.imageset/scrolldown_dark.png differ diff --git a/Riot/Assets/Images.xcassets/Room/Activities/scrolldown_dark.imageset/scrolldown_dark@2x.png b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown_dark.imageset/scrolldown_dark@2x.png new file mode 100644 index 000000000..1dfe3ab3d Binary files /dev/null and b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown_dark.imageset/scrolldown_dark@2x.png differ diff --git a/Riot/Assets/Images.xcassets/Room/Activities/scrolldown_dark.imageset/scrolldown_dark@3x.png b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown_dark.imageset/scrolldown_dark@3x.png new file mode 100644 index 000000000..14ae3aa1b Binary files /dev/null and b/Riot/Assets/Images.xcassets/Room/Activities/scrolldown_dark.imageset/scrolldown_dark@3x.png differ diff --git a/Riot/Assets/Images.xcassets/Room/Input/input_text_background.imageset/Contents.json b/Riot/Assets/Images.xcassets/Room/Input/input_text_background.imageset/Contents.json index 30afe661d..390e9a858 100644 --- a/Riot/Assets/Images.xcassets/Room/Input/input_text_background.imageset/Contents.json +++ b/Riot/Assets/Images.xcassets/Room/Input/input_text_background.imageset/Contents.json @@ -19,5 +19,8 @@ "info" : { "author" : "xcode", "version" : 1 + }, + "properties" : { + "template-rendering-intent" : "template" } } diff --git a/Riot/Assets/Images.xcassets/Room/Input/upload_icon_dark.imageset/Contents.json b/Riot/Assets/Images.xcassets/Room/Input/upload_icon_dark.imageset/Contents.json new file mode 100644 index 000000000..c5bb14104 --- /dev/null +++ b/Riot/Assets/Images.xcassets/Room/Input/upload_icon_dark.imageset/Contents.json @@ -0,0 +1,23 @@ +{ + "images" : [ + { + "filename" : "upload_icon_dark.png", + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "upload_icon_dark@2x.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "filename" : "upload_icon_dark@3x.png", + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Riot/Assets/Images.xcassets/Room/Input/upload_icon_dark.imageset/upload_icon_dark.png b/Riot/Assets/Images.xcassets/Room/Input/upload_icon_dark.imageset/upload_icon_dark.png new file mode 100644 index 000000000..cb0316cf9 Binary files /dev/null and b/Riot/Assets/Images.xcassets/Room/Input/upload_icon_dark.imageset/upload_icon_dark.png differ diff --git a/Riot/Assets/Images.xcassets/Room/Input/upload_icon_dark.imageset/upload_icon_dark@2x.png b/Riot/Assets/Images.xcassets/Room/Input/upload_icon_dark.imageset/upload_icon_dark@2x.png new file mode 100644 index 000000000..b58c78907 Binary files /dev/null and b/Riot/Assets/Images.xcassets/Room/Input/upload_icon_dark.imageset/upload_icon_dark@2x.png differ diff --git a/Riot/Assets/Images.xcassets/Room/Input/upload_icon_dark.imageset/upload_icon_dark@3x.png b/Riot/Assets/Images.xcassets/Room/Input/upload_icon_dark.imageset/upload_icon_dark@3x.png new file mode 100644 index 000000000..b04f2a977 Binary files /dev/null and b/Riot/Assets/Images.xcassets/Room/Input/upload_icon_dark.imageset/upload_icon_dark@3x.png differ diff --git a/Riot/Generated/Images.swift b/Riot/Generated/Images.swift index 6690852cf..51e1e62b7 100644 --- a/Riot/Generated/Images.swift +++ b/Riot/Generated/Images.swift @@ -102,6 +102,7 @@ internal enum Asset { internal static let errorMessageTick = ImageAsset(name: "error_message_tick") internal static let roomActivitiesRetry = ImageAsset(name: "room_activities_retry") internal static let scrolldown = ImageAsset(name: "scrolldown") + internal static let scrolldownDark = ImageAsset(name: "scrolldown_dark") internal static let sendingMessageTick = ImageAsset(name: "sending_message_tick") internal static let sentMessageTick = ImageAsset(name: "sent_message_tick") internal static let typing = ImageAsset(name: "typing") @@ -114,6 +115,7 @@ internal enum Asset { internal static let inputTextBackground = ImageAsset(name: "input_text_background") internal static let sendIcon = ImageAsset(name: "send_icon") internal static let uploadIcon = ImageAsset(name: "upload_icon") + internal static let uploadIconDark = ImageAsset(name: "upload_icon_dark") internal static let videoCall = ImageAsset(name: "video_call") internal static let voiceCallHangonIcon = ImageAsset(name: "voice_call_hangon_icon") internal static let voiceCallHangupIcon = ImageAsset(name: "voice_call_hangup_icon") diff --git a/Riot/Managers/Theme/Theme.swift b/Riot/Managers/Theme/Theme.swift index 4fcb9ca5c..54815e497 100644 --- a/Riot/Managers/Theme/Theme.swift +++ b/Riot/Managers/Theme/Theme.swift @@ -70,6 +70,7 @@ import UIKit // MARK: - Appearance and style + var roomInputTextBorder: UIColor { get } /// Status bar style to use var statusBarStyle: UIStatusBarStyle { get } diff --git a/Riot/Managers/Theme/Themes/DarkTheme.swift b/Riot/Managers/Theme/Themes/DarkTheme.swift index c2da703ae..d3752abf4 100644 --- a/Riot/Managers/Theme/Themes/DarkTheme.swift +++ b/Riot/Managers/Theme/Themes/DarkTheme.swift @@ -52,6 +52,8 @@ class DarkTheme: NSObject, Theme { var noticeSecondaryColor: UIColor = UIColor(rgb: 0x61708B) var warningColor: UIColor = UIColor(rgb: 0xFF4B55) + + var roomInputTextBorder: UIColor = UIColor(rgb: 0x8D97A5).withAlphaComponent(0.2) var avatarColors: [UIColor] = [ UIColor(rgb: 0x03B381), diff --git a/Riot/Managers/Theme/Themes/DefaultTheme.swift b/Riot/Managers/Theme/Themes/DefaultTheme.swift index e2fea3979..eb0ed522e 100644 --- a/Riot/Managers/Theme/Themes/DefaultTheme.swift +++ b/Riot/Managers/Theme/Themes/DefaultTheme.swift @@ -52,8 +52,8 @@ class DefaultTheme: NSObject, Theme { var noticeSecondaryColor: UIColor = UIColor(rgb: 0x61708B) var warningColor: UIColor = UIColor(rgb: 0xFF4B55) - - var messageTickColor: UIColor = UIColor(rgb: 0xC1C6CD) + + var roomInputTextBorder: UIColor = UIColor(rgb: 0xE3E8F0) var avatarColors: [UIColor] = [ UIColor(rgb: 0x03B381), diff --git a/Riot/Modules/BadgeLabel/BadgeLabel.swift b/Riot/Modules/BadgeLabel/BadgeLabel.swift index f52409871..f61f4dd6a 100644 --- a/Riot/Modules/BadgeLabel/BadgeLabel.swift +++ b/Riot/Modules/BadgeLabel/BadgeLabel.swift @@ -40,7 +40,7 @@ class BadgeLabel: UILabel { } } - @IBInspectable var padding: CGSize = CGSize(width: 10, height: 2) { + @IBInspectable var padding: CGSize = CGSize(width: 10, height: 3) { didSet { invalidateIntrinsicContentSize() } diff --git a/Riot/Modules/Room/RoomViewController.h b/Riot/Modules/Room/RoomViewController.h index f8bbc484f..873039ad9 100644 --- a/Riot/Modules/Room/RoomViewController.h +++ b/Riot/Modules/Room/RoomViewController.h @@ -27,6 +27,8 @@ #import "UIViewController+RiotSearch.h" +@class BadgeLabel; + /** Notification string used to indicate call tile tapped in a room. Notification object will be the `RoomBubbleCellData` object. */ @@ -47,6 +49,8 @@ extern NSNotificationName const RoomCallTileTappedNotification; @property (weak, nonatomic) IBOutlet UIButton *resetReadMarkerButton; @property (weak, nonatomic) IBOutlet UIView *jumpToLastUnreadBannerSeparatorView; @property (weak, nonatomic) IBOutlet UIVisualEffectView *inputBackgroundView; +@property (weak, nonatomic) IBOutlet UIButton *scrollToBottomButton; +@property (weak, nonatomic) IBOutlet BadgeLabel *scrollToBottomBadgeLabel; /** Preview data for a room invitation received by email, or a link to a room. @@ -73,5 +77,7 @@ extern NSNotificationName const RoomCallTileTappedNotification; */ - (IBAction)onButtonPressed:(id)sender; +- (IBAction)scrollToBottomAction:(id)sender; + @end diff --git a/Riot/Modules/Room/RoomViewController.m b/Riot/Modules/Room/RoomViewController.m index d5a762f9e..963fc991f 100644 --- a/Riot/Modules/Room/RoomViewController.m +++ b/Riot/Modules/Room/RoomViewController.m @@ -227,6 +227,7 @@ NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNo @property (nonatomic, strong) RoomInfoCoordinatorBridgePresenter *roomInfoCoordinatorBridgePresenter; @property (nonatomic, strong) CustomSizedPresentationController *customSizedPresentationController; @property (nonatomic, getter=isActivitiesViewExpanded) BOOL activitiesViewExpanded; +@property (nonatomic, getter=isScrollToBottomHidden) BOOL scrollToBottomHidden; @end @@ -291,7 +292,7 @@ NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNo formattedBodyParser = [FormattedBodyParser new]; _showMissedDiscussionsBadge = YES; - + _scrollToBottomHidden = YES; // Listen to the event sent state changes [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(eventDidChangeSentState:) name:kMXEventDidChangeSentStateNotification object:nil]; @@ -409,15 +410,6 @@ NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNo }]; [self userInterfaceThemeDidChange]; - - if ([ThemeService.shared.themeId isEqualToString:@"light"]) - { - self.inputBackgroundView.effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; - } - else if ([ThemeService.shared.themeId isEqualToString:@"dark"] || [ThemeService.shared.themeId isEqualToString:@"black"]) - { - self.inputBackgroundView.effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; - } } - (void)userInterfaceThemeDidChange @@ -468,6 +460,27 @@ NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNo [self.bubblesTableView reloadData]; } + self.scrollToBottomButton.layer.shadowColor = [UIColor blackColor].CGColor; + self.scrollToBottomButton.layer.shadowOpacity = 0.2; + self.scrollToBottomButton.layer.shadowRadius = 6; + self.scrollToBottomButton.layer.shadowOffset = CGSizeMake(0, 4); + + if ([ThemeService.shared.themeId isEqualToString:@"light"]) + { + self.inputBackgroundView.effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleLight]; + [self.scrollToBottomButton setImage:[UIImage imageNamed:@"scrolldown"] forState:UIControlStateNormal]; + } + else if ([ThemeService.shared.themeId isEqualToString:@"dark"] || [ThemeService.shared.themeId isEqualToString:@"black"]) + { + self.inputBackgroundView.effect = [UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]; + [self.scrollToBottomButton setImage:[UIImage imageNamed:@"scrolldown_dark"] forState:UIControlStateNormal]; + } + else if (@available(iOS 12.0, *) && ThemeService.shared.theme.userInterfaceStyle == UIUserInterfaceStyleDark) { + [self.scrollToBottomButton setImage:[UIImage imageNamed:@"scrolldown_dark"] forState:UIControlStateNormal]; + } + + self.scrollToBottomBadgeLabel.badgeColor = ThemeService.shared.theme.tintColor; + [self setNeedsStatusBarAppearanceUpdate]; } @@ -1276,7 +1289,7 @@ NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNo [super destroy]; } -#pragma mark - +#pragma mark - Properties -(void)setActivitiesViewExpanded:(BOOL)activitiesViewExpanded { @@ -1294,6 +1307,19 @@ NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNo missedDiscussionsBadgeLabel.hidden = !showMissedDiscussionsBadge; } +- (void)setScrollToBottomHidden:(BOOL)scrollToBottomHidden +{ + if (_scrollToBottomHidden != scrollToBottomHidden) + { + _scrollToBottomHidden = scrollToBottomHidden; + } + + [UIView animateWithDuration:.2 animations:^{ + self.scrollToBottomBadgeLabel.alpha = (scrollToBottomHidden || !self.scrollToBottomBadgeLabel.text) ? 0 : 1; + self.scrollToBottomButton.alpha = scrollToBottomHidden ? 0 : 1; + }]; +} + #pragma mark - Internals - (void)forceLayoutRefresh @@ -3647,6 +3673,11 @@ NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNo [widgetPicker showInViewController:self]; } +- (void)scrollToBottomAction:(id)sender +{ + [self goBackToLive]; +} + - (IBAction)onButtonPressed:(id)sender { if (sender == self.jumpToLastUnreadButton) @@ -4360,15 +4391,12 @@ NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNo // Retrieve the unread messages count NSUInteger unreadCount = self.roomDataSource.room.summary.localUnreadEventCount; - self.activitiesViewExpanded = YES; - [roomActivitiesView displayScrollToBottomIcon:unreadCount onIconTapGesture:^{ - - [self goBackToLive]; - - }]; + self.scrollToBottomBadgeLabel.text = unreadCount ? [NSString stringWithFormat:@"%lu", unreadCount] : nil; + self.scrollToBottomHidden = NO; } else if (serverNotices.usageLimit && serverNotices.usageLimit.isServerNoticeUsageLimit) { + self.scrollToBottomHidden = YES; self.activitiesViewExpanded = YES; [roomActivitiesView showResourceUsageLimitNotice:serverNotices.usageLimit onAdminContactTapped:^(NSURL *adminContactURL) { [[UIApplication sharedApplication] vc_open:adminContactURL completionHandler:^(BOOL success) { @@ -4381,6 +4409,7 @@ NSNotificationName const RoomCallTileTappedNotification = @"RoomCallTileTappedNo } else { + self.scrollToBottomHidden = YES; self.activitiesViewExpanded = NO; [self refreshTypingNotification]; } diff --git a/Riot/Modules/Room/RoomViewController.xib b/Riot/Modules/Room/RoomViewController.xib index 1d1205661..a43b40a18 100644 --- a/Riot/Modules/Room/RoomViewController.xib +++ b/Riot/Modules/Room/RoomViewController.xib @@ -29,6 +29,8 @@ + + @@ -130,6 +132,19 @@ + + @@ -158,12 +173,16 @@ + + + + @@ -184,8 +203,14 @@ + + + + + + diff --git a/Riot/Modules/Room/Views/Activities/RoomActivitiesView.h b/Riot/Modules/Room/Views/Activities/RoomActivitiesView.h index 54eb3feb7..b66c61a5f 100644 --- a/Riot/Modules/Room/Views/Activities/RoomActivitiesView.h +++ b/Riot/Modules/Room/Views/Activities/RoomActivitiesView.h @@ -73,16 +73,6 @@ */ - (void)displayOngoingConferenceCall:(void (^)(BOOL video))ongoingConferenceCallPressed onClosePressed:(void (^)(void))ongoingConferenceCallClosePressed; -/** - Display a "scroll to bottom" icon. - Replace the current notification if any. - - @param newMessagesCount the count of the unread messages. - @param onIconTapGesture block called when user taps on notification icon. - */ -- (void)displayScrollToBottomIcon:(NSUInteger)newMessagesCount onIconTapGesture:(void (^)(void))onIconTapGesture; - - /** Notify that the a room is obsolete and a replacement room is available. diff --git a/Riot/Modules/Room/Views/Activities/RoomActivitiesView.m b/Riot/Modules/Room/Views/Activities/RoomActivitiesView.m index 46bce5f6f..1f65678ad 100644 --- a/Riot/Modules/Room/Views/Activities/RoomActivitiesView.m +++ b/Riot/Modules/Room/Views/Activities/RoomActivitiesView.m @@ -268,62 +268,6 @@ [self checkHeight:YES]; } -- (void)displayScrollToBottomIcon:(NSUInteger)newMessagesCount onIconTapGesture:(void (^)(void))onIconTapGesture -{ - if (newMessagesCount) - { - [self reset]; - - self.iconImageView.image = [UIImage imageNamed:@"scrolldown"]; - self.iconImageView.tintColor = ThemeService.shared.theme.noticeColor; - - NSString *notification; - if (newMessagesCount > 1) - { - notification = NSLocalizedStringFromTable(@"room_new_messages_notification", @"Vector", nil); - } - else - { - notification = NSLocalizedStringFromTable(@"room_new_message_notification", @"Vector", nil); - } - self.messageLabel.text = [NSString stringWithFormat:notification, newMessagesCount]; - self.messageLabel.textColor = ThemeService.shared.theme.warningColor; - self.messageLabel.hidden = NO; - } - else - { - self.unsentMessagesContentView.hidden = YES; - - // We keep the current message if any - [self resetIcon]; - - self.messageLabel.text = nil; - self.iconImageView.image = [UIImage imageNamed:@"scrolldown"]; - self.iconImageView.tintColor = ThemeService.shared.theme.textPrimaryColor; - } - self.iconImageView.hidden = NO; - - // Make VoiceOver consider it as a button - self.iconImageView.accessibilityLabel = NSLocalizedStringFromTable(@"room_accessiblity_scroll_to_bottom", @"Vector", nil); - self.iconImageView.isAccessibilityElement = YES; - self.iconImageView.accessibilityTraits = UIAccessibilityTraitButton; - - if (onIconTapGesture) - { - objc_setAssociatedObject(self.iconImageView, "onIconTapGesture", [onIconTapGesture copy], OBJC_ASSOCIATION_RETAIN_NONATOMIC); - - // Listen to icon tap - UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(onIconTap:)]; - [tapGesture setNumberOfTouchesRequired:1]; - [tapGesture setNumberOfTapsRequired:1]; - [tapGesture setDelegate:self]; - [self.iconImageView addGestureRecognizer:tapGesture]; - self.iconImageView.userInteractionEnabled = YES; - } - - [self checkHeight:YES]; -} - - (void)displayRoomReplacementWithRoomLinkTappedHandler:(void (^)(void))onRoomReplacementLinkTapped { [self reset]; diff --git a/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m b/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m index 140e841e9..00cbb0d78 100644 --- a/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m +++ b/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.m @@ -85,7 +85,7 @@ growingTextView.font = [UIFont systemFontOfSize:15]; growingTextView.textColor = ThemeService.shared.theme.textPrimaryColor; growingTextView.tintColor = ThemeService.shared.theme.tintColor; - + growingTextView.placeholderColor = ThemeService.shared.theme.textTertiaryColor; growingTextView.internalTextView.showsVerticalScrollIndicator = NO; growingTextView.internalTextView.keyboardAppearance = ThemeService.shared.theme.keyboardAppearance; @@ -100,6 +100,19 @@ UIImage *image = [UIImage imageNamed:@"input_text_background"]; image = [image resizableImageWithCapInsets:UIEdgeInsetsMake(9, 15, 10, 16)]; self.inputTextBackgroundView.image = image; + self.inputTextBackgroundView.tintColor = ThemeService.shared.theme.roomInputTextBorder; + + if ([ThemeService.shared.themeId isEqualToString:@"light"]) + { + [self.attachMediaButton setImage:[UIImage imageNamed:@"upload_icon"] forState:UIControlStateNormal]; + } + else if ([ThemeService.shared.themeId isEqualToString:@"dark"] || [ThemeService.shared.themeId isEqualToString:@"black"]) + { + [self.attachMediaButton setImage:[UIImage imageNamed:@"upload_icon_dark"] forState:UIControlStateNormal]; + } + else if (@available(iOS 12.0, *) && ThemeService.shared.theme.userInterfaceStyle == UIUserInterfaceStyleDark) { + [self.attachMediaButton setImage:[UIImage imageNamed:@"upload_icon_dark"] forState:UIControlStateNormal]; + } } #pragma mark - @@ -187,21 +200,15 @@ if (self.rightInputToolbarButton.isEnabled && !self.rightInputToolbarButton.alpha) { - [UIView animateWithDuration:.4 delay:0 usingSpringWithDamping:0.7 initialSpringVelocity:8 options:UIViewAnimationOptionCurveEaseIn animations:^{ - self.rightInputToolbarButton.alpha = 1; - self.messageComposerContainerTrailingConstraint.constant = self.frame.size.width - self.rightInputToolbarButton.frame.origin.x + 12; - [self layoutIfNeeded]; - } completion:^(BOOL finished) { - }]; + self.rightInputToolbarButton.alpha = 1; + self.messageComposerContainerTrailingConstraint.constant = self.frame.size.width - self.rightInputToolbarButton.frame.origin.x + 12; + [self layoutIfNeeded]; } else if (!self.rightInputToolbarButton.isEnabled && self.rightInputToolbarButton.alpha) { - [UIView animateWithDuration:.4 delay:0 usingSpringWithDamping:0.7 initialSpringVelocity:8 options:UIViewAnimationOptionCurveEaseIn animations:^{ - self.rightInputToolbarButton.alpha = 0; - self.messageComposerContainerTrailingConstraint.constant = 12; - [self layoutIfNeeded]; - } completion:^(BOOL finished) { - }]; + self.rightInputToolbarButton.alpha = 0; + self.messageComposerContainerTrailingConstraint.constant = 12; + [self layoutIfNeeded]; } } diff --git a/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.xib b/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.xib index fab7ebe7d..c8ac8203d 100644 --- a/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.xib +++ b/Riot/Modules/Room/Views/InputToolbar/RoomInputToolbarView.xib @@ -14,13 +14,13 @@ - + - + - + - + @@ -52,7 +52,7 @@ - + - - + - - - + + + +