Prepare #904: Improve the people invite screens

- Make `RoomParticipantsViewController` inherit of the new class `ContactsTableViewController` to handle room members.
This commit is contained in:
giomfo
2017-01-11 18:58:11 +01:00
parent f83485d319
commit 69182bdfd5
6 changed files with 424 additions and 603 deletions
@@ -14,7 +14,7 @@
limitations under the License.
*/
#import <MatrixKit/MatrixKit.h>
#import "ContactsTableViewController.h"
#import "SegmentedViewController.h"
@@ -42,7 +42,7 @@
'RoomParticipantsViewController' instance is used to edit members of the room defined by the property 'mxRoom'.
When this property is nil, the view controller is empty.
*/
@interface RoomParticipantsViewController : MXKViewController <UITableViewDelegate, UITableViewDataSource, UISearchBarDelegate, MXKRoomMemberDetailsViewControllerDelegate>
@interface RoomParticipantsViewController : ContactsTableViewController <UISearchBarDelegate, UIGestureRecognizerDelegate, MXKRoomMemberDetailsViewControllerDelegate>
{
@protected
/**
@@ -50,9 +50,6 @@
*/
NSInteger participantsSection;
NSInteger invitedSection;
NSInteger invitableSectionSearchInput;
NSInteger invitableSectionAddressBookContacts;
NSInteger invitableSectionMatrixContacts;
/**
The current list of joined members.
@@ -67,15 +64,13 @@
/**
The contact used to describe the current user (nil if the user is not a participant of the room).
*/
Contact *userContact;
Contact *userParticipant;
}
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (weak, nonatomic) IBOutlet UIView *searchBarHeader;
@property (weak, nonatomic) IBOutlet UISearchBar *searchBarView;
@property (weak, nonatomic) IBOutlet UIView *searchBarHeaderBorder;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *searchBarTopConstraint;
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *tableViewBottomConstraint;
@@ -85,9 +80,9 @@
@property (nonatomic) MXRoom *mxRoom;
/**
Tell whether a search session is in progress
Tell whether the inviting people screen is displaying
*/
@property (nonatomic) BOOL isAddParticipantSearchBarEditing;
@property (nonatomic) BOOL isAddParticipantScreenDisplaying;
/**
Enable mention option in member details view. NO by default