mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Merge remote-tracking branch 'origin/develop' into element_3867
This commit is contained in:
commit
171705d05b
4 changed files with 274 additions and 128 deletions
173
CHANGES.rst
173
CHANGES.rst
|
@ -3,7 +3,180 @@ Changes to be released in next version
|
|||
|
||||
✨ Features
|
||||
|
||||
🙌 Improvements
|
||||
* Enable encryption for contacts, accounts, and crypto database (#3867)
|
||||
* Home: Show room directory on join room action (#3775).
|
||||
|
||||
🐛 Bugfix
|
||||
*
|
||||
|
||||
⚠️ API Changes
|
||||
*
|
||||
|
||||
🗣 Translations
|
||||
*
|
||||
|
||||
🧱 Build
|
||||
* XcodeGen: .xcodeproj files are now built from readable yml file: [New Build instructions](README.md#build-instructions) (#3812).
|
||||
* Podfile: Use MatrixKit for all targets and remove MatrixKit/AppExtension.
|
||||
* Fastlane: Use the "New Build System" to build releases.
|
||||
* Fastlane: Re-enable parallelised builds.
|
||||
|
||||
Others
|
||||
*
|
||||
|
||||
Changes in 1.2.1 (2021-02-12)
|
||||
=================================================
|
||||
|
||||
✨ Features
|
||||
*
|
||||
|
||||
🙌 Improvements
|
||||
* User-Interactive Authentication: Add UIA support for device deletion and add user 3PID action (#4016).
|
||||
|
||||
🐛 Bugfix
|
||||
* NSE: Wait for VoIP push request if any before calling contentHandler (#4018).
|
||||
* VoIP: Show dial pad option only if PSTN is supported (#4029).
|
||||
|
||||
⚠️ API Changes
|
||||
*
|
||||
|
||||
🗣 Translations
|
||||
*
|
||||
|
||||
🧱 Build
|
||||
*
|
||||
|
||||
Others
|
||||
*
|
||||
|
||||
Improvements:
|
||||
* Upgrade MatrixKit version ([v0.14.1](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.14.1)).
|
||||
|
||||
Changes in 1.2.0 (2021-02-11)
|
||||
=================================================
|
||||
|
||||
✨ Features
|
||||
*
|
||||
|
||||
🙌 Improvements
|
||||
* Cross-signing: Setup cross-signing without authentication parameters when a grace period is enabled after login (#4006).
|
||||
* VoIP: Implement DTMF on call screen (#3929).
|
||||
* VoIP: Implement call transfer screen (#3962).
|
||||
* VoIP: Implement call tiles on timeline (#3955).
|
||||
|
||||
🐛 Bugfix
|
||||
*
|
||||
|
||||
⚠️ API Changes
|
||||
*
|
||||
|
||||
🗣 Translations
|
||||
*
|
||||
|
||||
🧱 Build
|
||||
*
|
||||
|
||||
Others
|
||||
*
|
||||
|
||||
Improvements:
|
||||
* Upgrade MatrixKit version ([v0.14.0](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.14.0)).
|
||||
|
||||
Changes in 1.1.7 (2021-02-03)
|
||||
=================================================
|
||||
|
||||
✨ Features
|
||||
*
|
||||
|
||||
🙌 Improvements
|
||||
* Social login: Handle new identity provider brand field in order to customize buttons (#3980).
|
||||
* Widgets: Support $matrix_room_id and $matrix_widget_id parameters (#3987).
|
||||
* matrix.to: Support room preview when the permalink has parameters (like "via=").
|
||||
* Avoid megolm share requests if the device is not verified (#3969)
|
||||
* Handle User-Interactive Authentication fallback (#3995).
|
||||
|
||||
🐛 Bugfix
|
||||
* Push: Fix PushKit crashes due to undecryptable call invites (#3986).
|
||||
* matrix.to: Cannot open links with query parameters (#3990).
|
||||
* matrix.to: Cannot open/preview a new room given by alias (#3991).
|
||||
* matrix.to: The app does not open a permalink from matrix.to (#3993).
|
||||
* Logs: Add a size limitation so that we can upload them in bug reports (#3903).
|
||||
|
||||
⚠️ API Changes
|
||||
*
|
||||
|
||||
🗣 Translations
|
||||
*
|
||||
|
||||
🧱 Build
|
||||
*
|
||||
|
||||
Others
|
||||
*
|
||||
|
||||
Improvements:
|
||||
* Upgrade MatrixKit version ([v0.13.9](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.13.9)).
|
||||
|
||||
Changes in 1.1.6 (2021-01-27)
|
||||
=================================================
|
||||
|
||||
✨ Features
|
||||
*
|
||||
|
||||
🙌 Improvements
|
||||
*
|
||||
|
||||
🐛 Bugfix
|
||||
* Navigation: Unable to open a room from a room list (#3863).
|
||||
* AuthVC: Fix social login layout issue.
|
||||
|
||||
⚠️ API Changes
|
||||
*
|
||||
|
||||
🗣 Translations
|
||||
*
|
||||
|
||||
🧱 Build
|
||||
*
|
||||
|
||||
Others
|
||||
*
|
||||
|
||||
Improvements:
|
||||
* Upgrade MatrixKit version ([v0.13.8](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.13.8)).
|
||||
|
||||
Changes in 1.1.5 (2021-01-18)
|
||||
=================================================
|
||||
|
||||
✨ Features
|
||||
*
|
||||
|
||||
🙌 Improvements
|
||||
*
|
||||
|
||||
🐛 Bugfix
|
||||
*
|
||||
|
||||
⚠️ API Changes
|
||||
*
|
||||
|
||||
🗣 Translations
|
||||
*
|
||||
|
||||
🧱 Build
|
||||
*
|
||||
|
||||
Others
|
||||
*
|
||||
|
||||
Improvements:
|
||||
* Upgrade MatrixKit version ([v0.13.7](https://github.com/matrix-org/matrix-ios-kit/releases/tag/v0.13.7)).
|
||||
|
||||
Changes in 1.1.4 (2021-01-15)
|
||||
=================================================
|
||||
|
||||
✨ Features
|
||||
* Change Pin inside the app (#3881)
|
||||
* AuthVC: Add social login (#3846).
|
||||
* Invite friends: Add the ability to invite friends outside of Element in a few places (#3840).
|
||||
|
|
|
@ -165,6 +165,16 @@
|
|||
*/
|
||||
- (void)muteEditedRoomNotifications:(BOOL)mute;
|
||||
|
||||
/**
|
||||
Show room directory.
|
||||
*/
|
||||
- (void)showRoomDirectory;
|
||||
|
||||
/**
|
||||
Show a public room.
|
||||
*/
|
||||
- (void)openPublicRoom:(MXPublicRoom *)publicRoom;
|
||||
|
||||
#pragma mark - Scrolling
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
#import "Riot-Swift.h"
|
||||
|
||||
@interface RecentsViewController () <CreateRoomCoordinatorBridgePresenterDelegate>
|
||||
@interface RecentsViewController () <CreateRoomCoordinatorBridgePresenterDelegate, RoomsDirectoryCoordinatorBridgePresenterDelegate>
|
||||
{
|
||||
// Tell whether a recents refresh is pending (suspended during editing mode).
|
||||
BOOL isRefreshPending;
|
||||
|
@ -68,6 +68,8 @@
|
|||
|
||||
@property (nonatomic, strong) CreateRoomCoordinatorBridgePresenter *createRoomCoordinatorBridgePresenter;
|
||||
|
||||
@property (nonatomic, strong) RoomsDirectoryCoordinatorBridgePresenter *roomsDirectoryCoordinatorBridgePresenter;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RecentsViewController
|
||||
|
@ -856,6 +858,18 @@
|
|||
self.view.userInteractionEnabled = userInteractionEnabled;
|
||||
}
|
||||
|
||||
- (RecentsDataSource*)recentsDataSource
|
||||
{
|
||||
RecentsDataSource* recentsDataSource = nil;
|
||||
|
||||
if ([self.dataSource isKindOfClass:[RecentsDataSource class]])
|
||||
{
|
||||
recentsDataSource = (RecentsDataSource*)self.dataSource;
|
||||
}
|
||||
|
||||
return recentsDataSource;
|
||||
}
|
||||
|
||||
#pragma mark - MXKDataSourceDelegate
|
||||
|
||||
- (Class<MXKCellRendering>)cellViewClassForCellData:(MXKCellData*)cellData
|
||||
|
@ -1783,73 +1797,58 @@
|
|||
|
||||
- (void)joinARoom
|
||||
{
|
||||
[currentAlert dismissViewControllerAnimated:NO completion:nil];
|
||||
[self showRoomDirectory];
|
||||
}
|
||||
|
||||
__weak typeof(self) weakSelf = self;
|
||||
- (void)showRoomDirectory
|
||||
{
|
||||
if (!self.self.mainSession)
|
||||
{
|
||||
NSLog(@"[RecentsViewController] Fail to show room directory, session is nil");
|
||||
return;
|
||||
}
|
||||
|
||||
// Prompt the user to type a room id or room alias
|
||||
currentAlert = [UIAlertController alertControllerWithTitle:NSLocalizedStringFromTable(@"room_recents_join_room_title", @"Vector", nil)
|
||||
message:NSLocalizedStringFromTable(@"room_recents_join_room_prompt", @"Vector", nil)
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
self.roomsDirectoryCoordinatorBridgePresenter = [[RoomsDirectoryCoordinatorBridgePresenter alloc] initWithSession:self.mainSession dataSource:[self.recentsDataSource.publicRoomsDirectoryDataSource copy]];
|
||||
self.roomsDirectoryCoordinatorBridgePresenter.delegate = self;
|
||||
[self.roomsDirectoryCoordinatorBridgePresenter presentFrom:self animated:YES];
|
||||
}
|
||||
|
||||
[currentAlert addTextFieldWithConfigurationHandler:^(UITextField *textField) {
|
||||
- (void)openPublicRoom:(MXPublicRoom *)publicRoom
|
||||
{
|
||||
if (!self.recentsDataSource)
|
||||
{
|
||||
NSLog(@"[RecentsViewController] Fail to open public room, dataSource is not kind of class MXKRecentsDataSource");
|
||||
return;
|
||||
}
|
||||
|
||||
textField.secureTextEntry = NO;
|
||||
textField.placeholder = nil;
|
||||
textField.keyboardType = UIKeyboardTypeDefault;
|
||||
}];
|
||||
// Check whether the user has already joined the selected public room
|
||||
if ([self.recentsDataSource.publicRoomsDirectoryDataSource.mxSession roomWithRoomId:publicRoom.roomId])
|
||||
{
|
||||
// Open the public room
|
||||
[[AppDelegate theDelegate] showRoom:publicRoom.roomId andEventId:nil withMatrixSession:self.recentsDataSource.publicRoomsDirectoryDataSource.mxSession restoreInitialDisplay:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Preview the public room
|
||||
if (publicRoom.worldReadable)
|
||||
{
|
||||
RoomPreviewData *roomPreviewData = [[RoomPreviewData alloc] initWithPublicRoom:publicRoom andSession:self.recentsDataSource.publicRoomsDirectoryDataSource.mxSession];
|
||||
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"cancel"]
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:^(UIAlertAction * action) {
|
||||
[self startActivityIndicator];
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
typeof(self) self = weakSelf;
|
||||
self->currentAlert = nil;
|
||||
}
|
||||
// Try to get more information about the room before opening its preview
|
||||
[roomPreviewData peekInRoom:^(BOOL succeeded) {
|
||||
[self stopActivityIndicator];
|
||||
|
||||
}]];
|
||||
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:NSLocalizedStringFromTable(@"join", @"Vector", nil)
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
typeof(self) self = weakSelf;
|
||||
|
||||
NSString *roomAliasOrId = [self->currentAlert textFields].firstObject.text;
|
||||
|
||||
self->currentAlert = nil;
|
||||
|
||||
[self.activityIndicator startAnimating];
|
||||
|
||||
// TODO
|
||||
self->currentRequest = [self.mainSession joinRoom:roomAliasOrId viaServers:nil success:^(MXRoom *room) {
|
||||
|
||||
self->currentRequest = nil;
|
||||
[self.activityIndicator stopAnimating];
|
||||
|
||||
// Show the room
|
||||
[[AppDelegate theDelegate] showRoom:room.roomId andEventId:nil withMatrixSession:self.mainSession];
|
||||
|
||||
} failure:^(NSError *error) {
|
||||
|
||||
NSLog(@"[RecentsViewController] Join joinARoom (%@) failed", roomAliasOrId);
|
||||
|
||||
self->currentRequest = nil;
|
||||
[self.activityIndicator stopAnimating];
|
||||
|
||||
// Alert user
|
||||
[[AppDelegate theDelegate] showErrorAsAlert:error];
|
||||
}];
|
||||
}
|
||||
|
||||
}]];
|
||||
|
||||
[currentAlert mxk_setAccessibilityIdentifier:@"RecentsVCJoinARoomAlert"];
|
||||
[self presentViewController:currentAlert animated:YES completion:nil];
|
||||
[[AppDelegate theDelegate].masterTabBarController showRoomPreview:roomPreviewData];
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
RoomPreviewData *roomPreviewData = [[RoomPreviewData alloc] initWithPublicRoom:publicRoom andSession:self.recentsDataSource.publicRoomsDirectoryDataSource.mxSession];
|
||||
[[AppDelegate theDelegate].masterTabBarController showRoomPreview:roomPreviewData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#pragma mark - Table view scrolling
|
||||
|
@ -2052,4 +2051,28 @@
|
|||
return NO;
|
||||
}
|
||||
|
||||
#pragma mark - RoomsDirectoryCoordinatorBridgePresenterDelegate
|
||||
|
||||
- (void)roomsDirectoryCoordinatorBridgePresenterDelegateDidComplete:(RoomsDirectoryCoordinatorBridgePresenter *)coordinatorBridgePresenter
|
||||
{
|
||||
[coordinatorBridgePresenter dismissWithAnimated:YES completion:nil];
|
||||
self.roomsDirectoryCoordinatorBridgePresenter = nil;
|
||||
}
|
||||
|
||||
- (void)roomsDirectoryCoordinatorBridgePresenterDelegate:(RoomsDirectoryCoordinatorBridgePresenter *)coordinatorBridgePresenter didSelectRoom:(MXPublicRoom *)room
|
||||
{
|
||||
[coordinatorBridgePresenter dismissWithAnimated:YES completion:^{
|
||||
[self openPublicRoom:room];
|
||||
}];
|
||||
self.roomsDirectoryCoordinatorBridgePresenter = nil;
|
||||
}
|
||||
|
||||
- (void)roomsDirectoryCoordinatorBridgePresenterDelegateDidTapCreateNewRoom:(RoomsDirectoryCoordinatorBridgePresenter *)coordinatorBridgePresenter
|
||||
{
|
||||
[coordinatorBridgePresenter dismissWithAnimated:YES completion:^{
|
||||
[self createNewRoom];
|
||||
}];
|
||||
self.roomsDirectoryCoordinatorBridgePresenter = nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#import "Riot-Swift.h"
|
||||
|
||||
@interface RoomsViewController ()<RoomsDirectoryCoordinatorBridgePresenterDelegate>
|
||||
@interface RoomsViewController ()
|
||||
{
|
||||
RecentsDataSource *recentsDataSource;
|
||||
|
||||
|
@ -30,8 +30,6 @@
|
|||
UIView* footerSpinnerView;
|
||||
}
|
||||
|
||||
@property (nonatomic, strong) RoomsDirectoryCoordinatorBridgePresenter *roomsDirectoryCoordinatorBridgePresenter;
|
||||
|
||||
@end
|
||||
|
||||
@implementation RoomsViewController
|
||||
|
@ -128,9 +126,7 @@
|
|||
|
||||
- (void)onPlusButtonPressed
|
||||
{
|
||||
self.roomsDirectoryCoordinatorBridgePresenter = [[RoomsDirectoryCoordinatorBridgePresenter alloc] initWithSession:self.mainSession dataSource:[recentsDataSource.publicRoomsDirectoryDataSource copy]];
|
||||
self.roomsDirectoryCoordinatorBridgePresenter.delegate = self;
|
||||
[self.roomsDirectoryCoordinatorBridgePresenter presentFrom:self animated:YES];
|
||||
[self showRoomDirectory];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
@ -263,38 +259,6 @@
|
|||
[self openPublicRoom:publicRoom];
|
||||
}
|
||||
|
||||
- (void)openPublicRoom:(MXPublicRoom *)publicRoom
|
||||
{
|
||||
// Check whether the user has already joined the selected public room
|
||||
if ([recentsDataSource.publicRoomsDirectoryDataSource.mxSession roomWithRoomId:publicRoom.roomId])
|
||||
{
|
||||
// Open the public room
|
||||
[[AppDelegate theDelegate] showRoom:publicRoom.roomId andEventId:nil withMatrixSession:recentsDataSource.publicRoomsDirectoryDataSource.mxSession restoreInitialDisplay:NO];
|
||||
}
|
||||
else
|
||||
{
|
||||
// Preview the public room
|
||||
if (publicRoom.worldReadable)
|
||||
{
|
||||
RoomPreviewData *roomPreviewData = [[RoomPreviewData alloc] initWithPublicRoom:publicRoom andSession:recentsDataSource.publicRoomsDirectoryDataSource.mxSession];
|
||||
|
||||
[self startActivityIndicator];
|
||||
|
||||
// Try to get more information about the room before opening its preview
|
||||
[roomPreviewData peekInRoom:^(BOOL succeeded) {
|
||||
[self stopActivityIndicator];
|
||||
|
||||
[[AppDelegate theDelegate].masterTabBarController showRoomPreview:roomPreviewData];
|
||||
}];
|
||||
}
|
||||
else
|
||||
{
|
||||
RoomPreviewData *roomPreviewData = [[RoomPreviewData alloc] initWithPublicRoom:publicRoom andSession:recentsDataSource.publicRoomsDirectoryDataSource.mxSession];
|
||||
[[AppDelegate theDelegate].masterTabBarController showRoomPreview:roomPreviewData];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
- (void)triggerDirectoryPagination
|
||||
{
|
||||
if (!recentsDataSource
|
||||
|
@ -351,30 +315,6 @@
|
|||
}
|
||||
}
|
||||
|
||||
#pragma mark - RoomsDirectoryCoordinatorBridgePresenterDelegate
|
||||
|
||||
- (void)roomsDirectoryCoordinatorBridgePresenterDelegateDidComplete:(RoomsDirectoryCoordinatorBridgePresenter *)coordinatorBridgePresenter
|
||||
{
|
||||
[coordinatorBridgePresenter dismissWithAnimated:YES completion:nil];
|
||||
self.roomsDirectoryCoordinatorBridgePresenter = nil;
|
||||
}
|
||||
|
||||
- (void)roomsDirectoryCoordinatorBridgePresenterDelegate:(RoomsDirectoryCoordinatorBridgePresenter *)coordinatorBridgePresenter didSelectRoom:(MXPublicRoom *)room
|
||||
{
|
||||
[coordinatorBridgePresenter dismissWithAnimated:YES completion:^{
|
||||
[self openPublicRoom:room];
|
||||
}];
|
||||
self.roomsDirectoryCoordinatorBridgePresenter = nil;
|
||||
}
|
||||
|
||||
- (void)roomsDirectoryCoordinatorBridgePresenterDelegateDidTapCreateNewRoom:(RoomsDirectoryCoordinatorBridgePresenter *)coordinatorBridgePresenter
|
||||
{
|
||||
[coordinatorBridgePresenter dismissWithAnimated:YES completion:^{
|
||||
[self createNewRoom];
|
||||
}];
|
||||
self.roomsDirectoryCoordinatorBridgePresenter = nil;
|
||||
}
|
||||
|
||||
#pragma mark - Empty view management
|
||||
|
||||
- (void)updateEmptyView
|
||||
|
|
Loading…
Reference in a new issue