@@ -167,19 +167,25 @@ module.exports = React.createClass({
167167 return ;
168168 }
169169
170- if ( this . state . phase === this . Phase . GroupMemberList ) {
171- showGroupInviteDialog ( this . props . groupId ) ;
172- } else if ( this . state . phase === this . Phase . GroupRoomList ) {
173- showGroupAddRoomDialog ( this . props . groupId ) . then ( ( ) => {
174- this . forceUpdate ( ) ;
175- } ) ;
176- } else {
177- // call AddressPickerDialog
178- dis . dispatch ( {
179- action : 'view_invite' ,
180- roomId : this . props . roomId ,
170+ // call AddressPickerDialog
171+ dis . dispatch ( {
172+ action : 'view_invite' ,
173+ roomId : this . props . roomId ,
174+ } ) ;
175+ } ,
176+
177+ onInviteToGroupButtonClick : function ( ) {
178+ showGroupInviteDialog ( this . props . groupId ) . then ( ( ) => {
179+ this . setState ( {
180+ phase : this . Phase . GroupMemberList ,
181181 } ) ;
182- }
182+ } ) ;
183+ } ,
184+
185+ onAddRoomToGroupButtonClick : function ( ) {
186+ showGroupAddRoomDialog ( this . props . groupId ) . then ( ( ) => {
187+ this . forceUpdate ( ) ;
188+ } ) ;
183189 } ,
184190
185191 onRoomStateMember : function ( ev , state , member ) {
@@ -233,6 +239,10 @@ module.exports = React.createClass({
233239 this . setState ( {
234240 phase : this . Phase . GroupRoomList ,
235241 } ) ;
242+ } else if ( payload . action === "view_group_member_list" ) {
243+ this . setState ( {
244+ phase : this . Phase . GroupMemberList ,
245+ } ) ;
236246 } else if ( payload . action === "view_group_user" ) {
237247 this . setState ( {
238248 phase : this . Phase . GroupMemberInfo ,
@@ -376,14 +386,14 @@ module.exports = React.createClass({
376386
377387 if ( this . props . groupId && this . state . isUserPrivilegedInGroup ) {
378388 inviteGroup = isPhaseGroup ? (
379- < AccessibleButton className = "mx_RightPanel_invite" onClick = { this . onInviteButtonClick } >
389+ < AccessibleButton className = "mx_RightPanel_invite" onClick = { this . onInviteToGroupButtonClick } >
380390 < div className = "mx_RightPanel_icon" >
381391 < TintableSvg src = "img/icon-invite-people.svg" width = "35" height = "35" />
382392 </ div >
383393 < div className = "mx_RightPanel_message" > { _t ( 'Invite to this community' ) } </ div >
384394 </ AccessibleButton >
385395 ) : (
386- < AccessibleButton className = "mx_RightPanel_invite" onClick = { this . onInviteButtonClick } >
396+ < AccessibleButton className = "mx_RightPanel_invite" onClick = { this . onAddRoomToGroupButtonClick } >
387397 < div className = "mx_RightPanel_icon" >
388398 < TintableSvg src = "img/icons-room-add.svg" width = "35" height = "35" />
389399 </ div >
0 commit comments