From 7f561e27bcf90fdebfb1771691ad2fbf149ae42e Mon Sep 17 00:00:00 2001 From: Giom Foret Date: Tue, 20 Jun 2017 11:32:54 +0200 Subject: [PATCH] Enhancement - UX Rework: Update the buttons of the room expanded header. - Add a contact list button on the left of the members info to open contact list. - Add a add members button on the right to open the contacts picker. https://github.com/vector-im/riot-meta/issues/76 --- Riot.xcodeproj/project.pbxproj | 12 ++ Riot/Assets/Images/members_list_icon.png | Bin 0 -> 1083 bytes Riot/Assets/Images/members_list_icon@2x.png | Bin 0 -> 1666 bytes Riot/Assets/Images/members_list_icon@3x.png | Bin 0 -> 1988 bytes Riot/Base.lproj/Main.storyboard | 25 ++- .../RoomParticipantsViewController.m | 8 +- Riot/ViewController/RoomViewController.h | 4 +- Riot/ViewController/RoomViewController.m | 176 +++++++++++++++++- .../Views/RoomTitle/ExpandedRoomTitleView.xib | 49 +++-- Riot/Views/RoomTitle/RoomTitleView.h | 3 +- Riot/Views/RoomTitle/RoomTitleView.m | 10 + 11 files changed, 255 insertions(+), 32 deletions(-) create mode 100644 Riot/Assets/Images/members_list_icon.png create mode 100644 Riot/Assets/Images/members_list_icon@2x.png create mode 100644 Riot/Assets/Images/members_list_icon@3x.png diff --git a/Riot.xcodeproj/project.pbxproj b/Riot.xcodeproj/project.pbxproj index c767c6dd37..ad472c8325 100644 --- a/Riot.xcodeproj/project.pbxproj +++ b/Riot.xcodeproj/project.pbxproj @@ -422,6 +422,9 @@ F083BEA21E7009ED00A9B29C /* TableViewCellWithPhoneNumberTextField.m in Sources */ = {isa = PBXBuildFile; fileRef = F083BD1B1E7009ED00A9B29C /* TableViewCellWithPhoneNumberTextField.m */; }; F083BEA31E7009ED00A9B29C /* TableViewCellWithPhoneNumberTextField.xib in Resources */ = {isa = PBXBuildFile; fileRef = F083BD1C1E7009ED00A9B29C /* TableViewCellWithPhoneNumberTextField.xib */; }; F083BEA51E70356E00A9B29C /* RiotTests.m in Sources */ = {isa = PBXBuildFile; fileRef = F083BB041E7005FD00A9B29C /* RiotTests.m */; }; + F0A4A1671EF7CB66003630DB /* members_list_icon.png in Resources */ = {isa = PBXBuildFile; fileRef = F0A4A1641EF7CB66003630DB /* members_list_icon.png */; }; + F0A4A1681EF7CB66003630DB /* members_list_icon@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0A4A1651EF7CB66003630DB /* members_list_icon@2x.png */; }; + F0A4A1691EF7CB66003630DB /* members_list_icon@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0A4A1661EF7CB66003630DB /* members_list_icon@3x.png */; }; F0D869EB1EC455A100BB0A2B /* create_direct_chat.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D869E81EC455A100BB0A2B /* create_direct_chat.png */; }; F0D869EC1EC455A100BB0A2B /* create_direct_chat@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D869E91EC455A100BB0A2B /* create_direct_chat@2x.png */; }; F0D869ED1EC455A100BB0A2B /* create_direct_chat@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = F0D869EA1EC455A100BB0A2B /* create_direct_chat@3x.png */; }; @@ -1006,6 +1009,9 @@ F083BD1C1E7009ED00A9B29C /* TableViewCellWithPhoneNumberTextField.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = TableViewCellWithPhoneNumberTextField.xib; sourceTree = ""; }; F094A9A21B78D8F000B1FBBF /* Riot.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Riot.app; sourceTree = BUILT_PRODUCTS_DIR; }; F094A9BE1B78D8F000B1FBBF /* RiotTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RiotTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; + F0A4A1641EF7CB66003630DB /* members_list_icon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = members_list_icon.png; sourceTree = ""; }; + F0A4A1651EF7CB66003630DB /* members_list_icon@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "members_list_icon@2x.png"; sourceTree = ""; }; + F0A4A1661EF7CB66003630DB /* members_list_icon@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "members_list_icon@3x.png"; sourceTree = ""; }; F0D869E81EC455A100BB0A2B /* create_direct_chat.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = create_direct_chat.png; sourceTree = ""; }; F0D869E91EC455A100BB0A2B /* create_direct_chat@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "create_direct_chat@2x.png"; sourceTree = ""; }; F0D869EA1EC455A100BB0A2B /* create_direct_chat@3x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "create_direct_chat@3x.png"; sourceTree = ""; }; @@ -1156,6 +1162,9 @@ F083BB151E7009EC00A9B29C /* Images */ = { isa = PBXGroup; children = ( + F0A4A1641EF7CB66003630DB /* members_list_icon.png */, + F0A4A1651EF7CB66003630DB /* members_list_icon@2x.png */, + F0A4A1661EF7CB66003630DB /* members_list_icon@3x.png */, F0614A101EDEE65000F5DC9A /* cancel.png */, F0614A111EDEE65000F5DC9A /* cancel@2x.png */, F0614A121EDEE65000F5DC9A /* cancel@3x.png */, @@ -2130,6 +2139,7 @@ F083BD891E7009ED00A9B29C /* file_music_icon.png in Resources */, F083BDD11E7009ED00A9B29C /* settings_icon.png in Resources */, F083BD811E7009ED00A9B29C /* favourite@2x.png in Resources */, + F0A4A1681EF7CB66003630DB /* members_list_icon@2x.png in Resources */, F083BD9F1E7009ED00A9B29C /* mod_icon@2x.png in Resources */, F083BD801E7009ED00A9B29C /* favourite.png in Resources */, F083BD4B1E7009ED00A9B29C /* camera_capture.png in Resources */, @@ -2266,6 +2276,7 @@ F083BD631E7009ED00A9B29C /* direct_icon@2x.png in Resources */, F083BE991E7009ED00A9B29C /* MessagesSearchResultTextMsgBubbleCell.xib in Resources */, F083BD711E7009ED00A9B29C /* e2e_unencrypted.png in Resources */, + F0A4A1671EF7CB66003630DB /* members_list_icon.png in Resources */, F083BE731E7009ED00A9B29C /* RoomOutgoingTextMsgWithoutSenderInfoBubbleCell.xib in Resources */, F083BD251E7009ED00A9B29C /* admin_icon.png in Resources */, F083BDBE1E7009ED00A9B29C /* riot_icon@3x.png in Resources */, @@ -2328,6 +2339,7 @@ F083BDE01E7009ED00A9B29C /* video_icon.png in Resources */, F083BD601E7009ED00A9B29C /* details_icon@2x.png in Resources */, F083BE5F1E7009ED00A9B29C /* RoomIncomingAttachmentWithPaginationTitleBubbleCell.xib in Resources */, + F0A4A1691EF7CB66003630DB /* members_list_icon@3x.png in Resources */, F083BE8D1E7009ED00A9B29C /* PreviewRoomTitleView.xib in Resources */, F083BD561E7009ED00A9B29C /* camera_video_capture.png in Resources */, F083BD651E7009ED00A9B29C /* directChatOff.png in Resources */, diff --git a/Riot/Assets/Images/members_list_icon.png b/Riot/Assets/Images/members_list_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..eb23ecd65356ab66a084764be7f1b6ec66ea9dd1 GIT binary patch literal 1083 zcmeAS@N?(olHy`uVBq!ia0vp^{2!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8X6a5n0T@z%2~Ij105p zNH8!kp3V%3D2ed(u}aR*)k{ptPfFFR$SnY>W?-j zfNYSkzLEl1NlCV?QiN}Sf^&XRs)DJWiJpOy9hZWFf=y9MnpKdC8&o@xXRDM^Qc_^0 zuU}qXu2*iXmtT~wZ)j<0sc&GUZ)BtkRH0j3nOBlnp_^B%3^4>|j!SBBa#3bMNoIbY z0?6FNr2NtnTO}osMQ{LdXGvxn!lt}psJDO~)CbAv8|oS8W77uoEZlu4x+)S2Aez9w zf>>q)GRn%oC^Hr4T#%#e3~j*1qlh6KX9G0d%DE^tu_V7JBtJjL&Jh&W3ZA)%>8U}f zi7Ayf`sga4nr-w!-bM00By7Q=z`(WR0_ucClpWV5<+_i+Xuaj>;uxYK+8ew#Tf|YM zK0odIB<71T$}^UHI?!)Y<*3sXv1F5|rBcLGzb%_Q1iM2t-@IXYD0FVOy+e0HZ$e=z z2bW+n$HNZJi5iZcK^_zS&UpU*>`p_C<>tFLzd!rF_HWufoj@}ei{R?1a~TwmDMwyd zb7oekRASXU#p5Y68K%n`%KyCF{B82SWWE34ffvHp?OPu|eadsek81)~*{##Nemdue zk)@rA*y5QoYA-a8*S*l6JzdMYQ7U0)ga+R{`yW3leWvHUv6y&AP5JkUd{JYC&g+T? zHPyCrW}FP)_q|NdM`MRrz$T;mr~k}L-=&slJ^!3;(UqsNGJcy@zEryJd`*?iDQzNh zPdgW~PRpIOnpB)w^tGbJw@I6Pp>|x;M4Rrg`sO&YT_XY*n{TStgWCU_N$1 zToM1SQ-MQfCj~zbJKI@aROJ2a~rStNZZ!&EmJGzRXkk*XnmI quY9-nwEgeQzI~n@H+_Nq!}+^DExyBJ6a5vGMLk{pT-G@yGywpbke2ZP literal 0 HcmV?d00001 diff --git a/Riot/Assets/Images/members_list_icon@2x.png b/Riot/Assets/Images/members_list_icon@2x.png new file mode 100644 index 0000000000000000000000000000000000000000..8eb7a46cab521a45cded7699aa4b1fc4c178cbbe GIT binary patch literal 1666 zcmeAS@N?(olHy`uVBq!ia0vp^av;pX1|+Qw)-3{3Ea{HEjtmSN`?>!lvI6-E$sR$z z3=CCj3=9n|3=F@3LJcn%7)lKo7+xhXFj&oCU=S~uvn$XBD8X6a5n0T@z%2~Ij105p zNH8!kp3V%3D2ed(u}aR*)k{ptPfFFR$SnY>W?-j zfNYSkzLEl1NlCV?QiN}Sf^&XRs)DJWiJpOy9hZWFf=y9MnpKdC8&o@xXRDM^Qc_^0 zuU}qXu2*iXmtT~wZ)j<0sc&GUZ)BtkRH0j3nOBlnp_^B%3^4>|j!SBBa#3bMNoIbY z0?6FNr2NtnTO}osMQ{LdXGvxn!lt}psJDO~)CbAv8|oS8W77uoEZlu4x+)S2Aez9w zf>>q)GRn%oC^Hr4T#%#e3~j*1qlh6KX9G0d%DE^tu_V7JBtJjL&Jh&W3ZA)%>8U}f zi7Ayf`sga4nr-w!-bM00By7Q=z`(WR0_ucClpWV5<+_i+WTNQl;uzw=`!>usBPLYD z?)kad)6e*%IUQ@8A+$KROJr4~#|M5bk(Q+CPP;UxnylpA@nVsJ(?W?iP6ex*W|`<7 z3*Ee7(E~Salcr0{4lZKU6xvuiam(e-$tU;B{C=sqAa! zxfi+o?~&A=`*APFqba%VLOMR%TI+wAW=AE;1PQG<{qgS3$wzj2$w#?aurAe6`jTB_ zzT!ktQMB5_wbuSpQ@xzyjpkN4PHvdib=Yr7{ry7UrZOweb6#;Ob1i1ec14=*et2h| zvUYO#^18q{0~MW#8qc{b0}eW!@UU;Z_I~QsN844FYJOxc+P>}XoSviv&cOoI{^ zW$h2~ymYE&&F;;+0$tXtiBA_0pZLkon?LWu2TsO~`oFuF<0VCp-p`A9b?atz>+{u5 zGN&t=RQam4>TWRial7vXDbyw=TsJd{AT0My85#dJ9B=C?tgSn@ciyG zFO=SGy?xvM!IA}gmOWA0IZY~v^Tn1gPnUjmx8|F8BKMex?n$X-Vheey_ukjZIK_GX zjpZ!)SPSFFVsq>otEw&I|IBjwyHhala@D!=J=ZJOX)rab1fG_JT|cs=jylSMOxc`pVn*SRehXvDCv>96_a>ylrX zYA4*g`hQZ(16`~89lvr~9#aP`6YpEp%-Z2KXw;f3OZqd z&)R>C@4~~&>@Qv#pYWfbm1J7_!d^(a@g(0qZ)y4JtB*}Co&B;qvv-&I%ZHbCMK}0* f$?Mr1;P}J)nCGBQp)z4*}Q$iB}mtwf7 literal 0 HcmV?d00001 diff --git a/Riot/Assets/Images/members_list_icon@3x.png b/Riot/Assets/Images/members_list_icon@3x.png new file mode 100644 index 0000000000000000000000000000000000000000..ec24ed814d286277f7f5ce9f9361527a1c75fadb GIT binary patch literal 1988 zcmZuy2{;s58y@@CAWK_wrldH3MXJ3k{ zkB`uch$2$3R6SyZ=C>e!#If*?xJbr_QSc-pNDvo`BVD4P!C*n6KgWKZgs?vo5hM0l z@%cfi*f1y@0)zfPCkj5`uk!xGOK|ed?JKKq$x!^(AkE4CSPF^kMk0k8pA+;BWJ|yX z`n&jJ{i0CN|3>^(DM}C$d7g~-=W`V>GKQm||6|+7qo4x1f204cw_mON<{C@$GyQQ< z#?m^FJ~RLzmTPNq&J82Agt5zVvs7YKZZAZ>s*3TwB@_T^PE=8X=W1&;Ws9+}|G18W zStuZOg<|H1I%hQRimNCprX)d9k27K|6grbsVAp9KDBq{ei(~fdOEDx3b`!c`DL_1- zz-n@Ql*?#(f2VTm!)gVuNVlu76dzwER(L4Li=Ly`_Ak*-%SjE$1DYz2OYKf6+*Ti7 z*?Cz+*~4#w2Xwwm``pX1<)(^g;ne|e5||-n&T6si@v}d9<-hcqK@N z83qnrx)G!?NS%>ch@rEi6Vkqv4W>Oqi?p#y3_Z~98WT-Qc>!kXy5SMRvwFbj{62Ae zoX?}m8knZ_(-+!760dH(gRR%)WHUt($`@qbh{g4% zjbQFoKc-E~b_p{qLl9q-U1Fy>_fiVW_Il{54K+THp9xKK3U89($^w(sg8=w?+s@|%>T6Q{`(l5m= zCzY=xV>>%c?r>lGY-?WSNDVkEi#wGwd&T92rgy^L4<7XA@BzC#(lybW_2A$|`Q+cs z7!!4-4%b@jt$l2Z&1T|>Dpm%TOTVt54G9<@1hFnxRQizwNuIW2>W6qQ7RXDcJ;i zyeIb6on!YmN=Puf4Q9Q%m=x}-st;;pXPRX3uBXj*?hoXn2^TFe1qH)1jY1hbXEyJ* z7JJ#Eh7%5)jayGP)K;h2kVQY_B2!jZFs&Y580##bV-KG)v9_oYq{J|6H}Jf zrV#>n+Y1?u!eI*FdM?4Pt#0fZwTjj8jh6Z0-Rg`Z<#DvVis+me?bY8Cbxt=kLeA*3 z+~-m*-$2r*OI7#NUaT1SMYWUj14qZo zJ;CwC_MMNRnPg29U@;ZDF;Y4lXRRwCe=HC2GtQz9hDdbXGBB63k)UB5 zIg@P$x@=>hrQB-0Uv5@#qlzDk`2(7d6h`}ok9r(;W)m3KVm7)`ZZ4Z#rN^iTXM z%!UiuRn5BI3K33Tb)2ofRiy5p{9?oOkP0)k`O*VeQCG>@6&N^vq^??#C8K#~{L%E& zmgkmJF|iV3%b(DPnoSZ + @@ -524,6 +525,24 @@ + + + + + + + + + + + + + + + + + + @@ -558,9 +577,9 @@ - + + - - + diff --git a/Riot/ViewController/RoomParticipantsViewController.m b/Riot/ViewController/RoomParticipantsViewController.m index 0fd839f48e..9f762fbd00 100644 --- a/Riot/ViewController/RoomParticipantsViewController.m +++ b/Riot/ViewController/RoomParticipantsViewController.m @@ -601,7 +601,7 @@ - (void)onAddParticipantButtonPressed // Add a plus icon to the contact cell in the contacts picker, in order to make it more understandable for the end user. contactsDataSource.contactCellAccessoryImage = [UIImage imageNamed:@"plus_icon"]; - // List all the participants by their matrix user id, or a room 3pid invite token to ignore them during the contacts search. + // List all the participants matrix user id to ignore them during the contacts search. for (Contact *contact in actualParticipants) { [contactsDataSource.ignoredContactsByMatrixId setObject:contact forKey:contact.mxMember.userId]; @@ -612,10 +612,6 @@ - (void)onAddParticipantButtonPressed { [contactsDataSource.ignoredContactsByMatrixId setObject:contact forKey:contact.mxMember.userId]; } - else if (contact.mxThirdPartyInvite) - { - [contactsDataSource.ignoredContactsByMatrixId setObject:contact forKey:contact.mxThirdPartyInvite.token]; - } } if (userParticipant) { @@ -905,7 +901,7 @@ - (void)removePendingActionMask - (void)pushViewController:(UIViewController*)viewController { // Check whether the view controller is displayed inside a segmented one. - if (self.parentViewController) + if (self.parentViewController.navigationController) { // Hide back button title self.parentViewController.navigationItem.backBarButtonItem =[[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStylePlain target:nil action:nil]; diff --git a/Riot/ViewController/RoomViewController.h b/Riot/ViewController/RoomViewController.h index 45fd0f0bd1..ac4c2ac11f 100644 --- a/Riot/ViewController/RoomViewController.h +++ b/Riot/ViewController/RoomViewController.h @@ -23,9 +23,11 @@ #import "RoomParticipantsViewController.h" +#import "ContactsTableViewController.h" + #import "UIViewController+RiotSearch.h" -@interface RoomViewController : MXKRoomViewController +@interface RoomViewController : MXKRoomViewController // The expanded header @property (weak, nonatomic) IBOutlet UIView *expandedHeaderContainer; diff --git a/Riot/ViewController/RoomViewController.m b/Riot/ViewController/RoomViewController.m index 001c888b13..77460e2c07 100644 --- a/Riot/ViewController/RoomViewController.m +++ b/Riot/ViewController/RoomViewController.m @@ -906,7 +906,7 @@ - (BOOL)isIRCStyleCommand:(NSString*)string } failure:^(NSError *error) { - NSLog(@"[Vector RoomVC] Join roomAlias (%@) failed", roomAlias); + NSLog(@"[RoomVC] Join roomAlias (%@) failed", roomAlias); //Alert user [[AppDelegate theDelegate] showErrorAsAlert:error]; @@ -1007,7 +1007,7 @@ - (void)destroy if (previewHeader || (self.expandedHeaderContainer.isHidden == NO)) { // Here [destroy] is called before [viewWillDisappear:] - NSLog(@"[Vector RoomVC] destroyed whereas it is still visible"); + NSLog(@"[RoomVC] destroyed whereas it is still visible"); [previewHeader removeFromSuperview]; previewHeader = nil; @@ -1198,7 +1198,7 @@ - (void)showExpandedHeader:(BOOL)isVisible // - if the event details view is displayed if (isVisible && (isSizeTransitionInProgress == YES || !self.roomDataSource || !self.roomDataSource.isLive || (self.roomDataSource.room.state.membership != MXMembershipJoin) || !self.splitViewController || encryptionInfoView.superview || eventDetailsView.superview)) { - NSLog(@"[Vector RoomVC] Show expanded header ignored"); + NSLog(@"[RoomVC] Show expanded header ignored"); return; } @@ -1279,7 +1279,7 @@ - (void)showPreviewHeader:(BOOL)isVisible // or if the view controller is not embedded inside a split view controller yet. if (isVisible && (isSizeTransitionInProgress == YES || !self.splitViewController)) { - NSLog(@"[Vector RoomVC] Show preview header ignored"); + NSLog(@"[RoomVC] Show preview header ignored"); return; } @@ -1984,7 +1984,7 @@ - (void)showEditButtonAlertMenuForEvent:(MXEvent*)selectedEvent inCell:(idcurrentAlert = nil; + + }]; + + [currentAlert addActionWithTitle:NSLocalizedStringFromTable(@"invite", @"Vector", nil) + style:MXKAlertActionStyleDefault + handler:^(MXKAlert *alert) { + + __strong __typeof(weakSelf)strongSelf = weakSelf; + strongSelf->currentAlert = nil; + + MXSession* session = strongSelf.roomDataSource.mxSession; + NSString* roomId = strongSelf.roomDataSource.roomId; + MXRoom *room = [session roomWithRoomId:roomId]; + + NSArray *identifiers = contact.matrixIdentifiers; + NSString *participantId; + + if (identifiers.count) + { + participantId = identifiers.firstObject; + + // Invite this user if a room is defined + [room inviteUser:participantId success:^{ + + // Refresh display by removing the contacts picker + [contactsTableViewController withdrawViewControllerAnimated:YES completion:nil]; + + } failure:^(NSError *error) { + + NSLog(@"[RoomVC] Invite %@ failed", participantId); + // Alert user + [[AppDelegate theDelegate] showErrorAsAlert:error]; + + }]; + } + else + { + if (contact.emailAddresses.count) + { + // This is a local contact, consider the first email by default. + // TODO: Prompt the user to select the right email. + MXKEmail *email = contact.emailAddresses.firstObject; + participantId = email.emailAddress; + } + else + { + // This is the text filled by the user. + participantId = contact.displayName; + } + + // Is it an email or a Matrix user ID? + if ([MXTools isEmailAddress:participantId]) + { + [room inviteUserByEmail:participantId success:^{ + + // Refresh display by removing the contacts picker + [contactsTableViewController withdrawViewControllerAnimated:YES completion:nil]; + + } failure:^(NSError *error) { + + NSLog(@"[RoomVC] Invite be email %@ failed", participantId); + // Alert user + [[AppDelegate theDelegate] showErrorAsAlert:error]; + + }]; + } + else //if ([MXTools isMatrixUserIdentifier:participantId]) + { + [room inviteUser:participantId success:^{ + + // Refresh display by removing the contacts picker + [contactsTableViewController withdrawViewControllerAnimated:YES completion:nil]; + + } failure:^(NSError *error) { + + NSLog(@"[RoomVC] Invite %@ failed", participantId); + // Alert user + [[AppDelegate theDelegate] showErrorAsAlert:error]; + + }]; + } + } + + }]; + + currentAlert.mxkAccessibilityIdentifier = @"RoomVCInviteAlert"; + [currentAlert showInViewController:self]; +} + @end diff --git a/Riot/Views/RoomTitle/ExpandedRoomTitleView.xib b/Riot/Views/RoomTitle/ExpandedRoomTitleView.xib index 200d52f666..78005181b8 100644 --- a/Riot/Views/RoomTitle/ExpandedRoomTitleView.xib +++ b/Riot/Views/RoomTitle/ExpandedRoomTitleView.xib @@ -1,11 +1,12 @@ - - + + - + + @@ -47,12 +48,12 @@ - - + + - - + + @@ -67,9 +68,28 @@ - + + + + + + + + + + + + + + + + + + + + @@ -77,15 +97,18 @@ + - + + - + + @@ -97,16 +120,17 @@ + - + @@ -119,6 +143,7 @@ - + + diff --git a/Riot/Views/RoomTitle/RoomTitleView.h b/Riot/Views/RoomTitle/RoomTitleView.h index 36d9ee86f2..23b198f5ec 100644 --- a/Riot/Views/RoomTitle/RoomTitleView.h +++ b/Riot/Views/RoomTitle/RoomTitleView.h @@ -36,6 +36,7 @@ @property (weak, nonatomic) IBOutlet UIView *titleMask; @property (weak, nonatomic) IBOutlet UIView *roomDetailsMask; +@property (weak, nonatomic) IBOutlet UIView *addParticipantMask; @property (weak, nonatomic) IBOutlet NSLayoutConstraint *displayNameCenterXConstraint; @property (weak, nonatomic) IBOutlet UIImageView *roomDetailsIconImageView; @@ -54,4 +55,4 @@ */ - (void)reportTapGesture:(UITapGestureRecognizer*)tapGestureRecognizer; -@end \ No newline at end of file +@end diff --git a/Riot/Views/RoomTitle/RoomTitleView.m b/Riot/Views/RoomTitle/RoomTitleView.m index cbe4b02787..2240da8e59 100644 --- a/Riot/Views/RoomTitle/RoomTitleView.m +++ b/Riot/Views/RoomTitle/RoomTitleView.m @@ -59,6 +59,16 @@ - (void)awakeFromNib [self.roomDetailsMask addGestureRecognizer:tap]; self.roomDetailsMask.userInteractionEnabled = YES; } + + if (_addParticipantMask) + { + UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(reportTapGesture:)]; + [tap setNumberOfTouchesRequired:1]; + [tap setNumberOfTapsRequired:1]; + [tap setDelegate:self]; + [self.addParticipantMask addGestureRecognizer:tap]; + self.addParticipantMask.userInteractionEnabled = YES; + } } - (void)layoutSubviews