зеркало из https://github.com/nextcloud/talk-ios.git
focus room name input field at first appearance.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
cc50fd7d1c
Коммит
0c3d24c886
|
@ -41,6 +41,7 @@ NSString * const NCRoomCreatedNotification = @"NCRoomCreatedNotification";
|
|||
@property (nonatomic, assign) NSInteger participantsToBeAdded;
|
||||
@property (nonatomic, strong) NSString *passwordToBeSet;
|
||||
@property (nonatomic, strong) NSString *createdRoomToken;
|
||||
@property (nonatomic, assign) BOOL didFocusRoomNameOnce;
|
||||
|
||||
@end
|
||||
|
||||
|
@ -335,6 +336,17 @@ NSString * const NCRoomCreatedNotification = @"NCRoomCreatedNotification";
|
|||
return nil;
|
||||
}
|
||||
|
||||
- (void)tableView:(UITableView *)tableView willDisplayCell:(nonnull UITableViewCell *)cell forRowAtIndexPath:(nonnull NSIndexPath *)indexPath
|
||||
{
|
||||
BOOL isRoomNameCell = indexPath.row == 0 && indexPath.section == kCreationSectionName;
|
||||
BOOL one2one = [self isOneToOneConversation];
|
||||
if (isRoomNameCell && !_didFocusRoomNameOnce && !one2one) {
|
||||
RoomNameTableViewCell *roomNameCell = (RoomNameTableViewCell *)cell;
|
||||
[roomNameCell.roomNameTextField becomeFirstResponder];
|
||||
_didFocusRoomNameOnce = YES;
|
||||
}
|
||||
}
|
||||
|
||||
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
|
||||
UITableViewCell *cell = nil;
|
||||
static NSString *publicCellIdentifier = @"PublicConversationCellIdentifier";
|
||||
|
|
Загрузка…
Ссылка в новой задаче