Merge branch 'develop' into riot_3396

This commit is contained in:
ismailgulek 2020-07-16 13:10:29 +03:00 committed by GitHub
commit 2bc6f09a7f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 44 additions and 90 deletions

View file

@ -6,6 +6,8 @@ Improvements:
* Theme: Customize UISearchBar with new iOS 13 properties (#3270).
* NSE: Make extension reusable (#3326).
* Strings: Use you instead of display name on notice events (#3282).
* Third-party licences: Add license for FlowCommoniOS (#3415).
* Lazy-loading: Remove lazy loading labs setting, enable it by default (#3389).
Bug fix:
* Xcode11: Fix content change error when dragging start chat page (PR #3075).
@ -31,6 +33,8 @@ Bug fix:
* Xcode11: Disable voip background mode to avoid VoIP pushes (#3369).
* Xcode11: Disable key backup on push extension (#3371).
* RoomMembershipBubbleCell: Fix message textview leading constraint (#3226).
* SettingsViewController: Fix crash when scrolling to Discovery (#3401).
* Main.storyboard: Set storyboard identifier for SettingsViewController (#3398).
* SettingsViewController: Fix pan gesture crash (#3396).
Changes in 0.11.6 (2020-06-30)

View file

@ -511,6 +511,9 @@ NSString *const AppDelegateUniversalLinkDidChangeNotification = @"AppDelegateUni
// Disable CallKit
[MXKAppSettings standardAppSettings].enableCallKit = NO;
// Enable lazy loading
[MXKAppSettings standardAppSettings].syncWithLazyLoadOfRoomMembers = YES;
self.pushNotificationService = [PushNotificationService new];
self.pushNotificationService.delegate = self;

View file

@ -324,7 +324,7 @@
<!--Settings-->
<scene sceneID="9we-7Q-LBo">
<objects>
<tableViewController title="Settings" id="taU-5Q-sdv" customClass="SettingsViewController" sceneMemberID="viewController">
<tableViewController storyboardIdentifier="SettingsViewController" title="Settings" id="taU-5Q-sdv" customClass="SettingsViewController" sceneMemberID="viewController">
<tableView key="view" clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" keyboardDismissMode="interactive" dataMode="prototypes" style="grouped" separatorStyle="default" rowHeight="44" sectionHeaderHeight="18" sectionFooterHeight="18" id="egL-pK-Xhr">
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>

View file

@ -482,8 +482,6 @@
"settings_labs_e2e_encryption" = "End-to-End Encryption";
"settings_labs_e2e_encryption_prompt_message" = "To finish setting up encryption you must log in again.";
"settings_labs_room_members_lazy_loading" = "Lazy load rooms members";
"settings_labs_room_members_lazy_loading_error_message" = "Your homeserver does not support lazy loading of room members yet. Try later.";
"settings_labs_create_conference_with_jitsi" = "Create conference calls with jitsi";
"settings_labs_message_reaction" = "React to messages with emoji";

View file

@ -1425,6 +1425,28 @@
THE SOFTWARE.
<br/><br/>
</li>
<li>
<b>FlowCommoniOS</b> (<a href="https://github.com/createwithflow/FlowCommoniOS">https://github.com/createwithflow/FlowCommoniOS</a>)
<br/><br/>FlowCommoniOS is a set of common files for Flow Animations.
<br/><br/>It is released under the MIT license.
<br/><br/>Copyright © 2016-2020 JABT Labs Inc.
<br/><br/>Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
<br/><br/>The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
<br/><br/>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
<br/><br/>
</li>
</ul>
</body>
</html>

View file

@ -3674,14 +3674,6 @@ internal enum VectorL10n {
internal static var settingsLabsMessageReaction: String {
return VectorL10n.tr("Vector", "settings_labs_message_reaction")
}
/// Lazy load rooms members
internal static var settingsLabsRoomMembersLazyLoading: String {
return VectorL10n.tr("Vector", "settings_labs_room_members_lazy_loading")
}
/// Your homeserver does not support lazy loading of room members yet. Try later.
internal static var settingsLabsRoomMembersLazyLoadingErrorMessage: String {
return VectorL10n.tr("Vector", "settings_labs_room_members_lazy_loading_error_message")
}
/// Mark all messages as read
internal static var settingsMarkAllAsRead: String {
return VectorL10n.tr("Vector", "settings_mark_all_as_read")

View file

@ -131,8 +131,7 @@ enum
enum
{
LABS_USE_ROOM_MEMBERS_LAZY_LOADING_INDEX = 0,
LABS_USE_JITSI_WIDGET_INDEX,
LABS_USE_JITSI_WIDGET_INDEX = 0,
LABS_COUNT
};
@ -2135,21 +2134,7 @@ SettingsIdentityServerCoordinatorBridgePresenterDelegate>
}
else if (section == SETTINGS_SECTION_LABS_INDEX)
{
if (row == LABS_USE_ROOM_MEMBERS_LAZY_LOADING_INDEX)
{
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
labelAndSwitchCell.mxkLabel.text = NSLocalizedStringFromTable(@"settings_labs_room_members_lazy_loading", @"Vector", nil);
MXKAccount* account = [MXKAccountManager sharedManager].activeAccounts.firstObject;
labelAndSwitchCell.mxkSwitch.on = account.mxSession.syncWithLazyLoadOfRoomMembers;
labelAndSwitchCell.mxkSwitch.onTintColor = ThemeService.shared.theme.tintColor;
[labelAndSwitchCell.mxkSwitch addTarget:self action:@selector(toggleSyncWithLazyLoadOfRoomMembers:) forControlEvents:UIControlEventTouchUpInside];
cell = labelAndSwitchCell;
}
else if (row == LABS_USE_JITSI_WIDGET_INDEX)
if (row == LABS_USE_JITSI_WIDGET_INDEX)
{
MXKTableViewCellWithLabelAndSwitch* labelAndSwitchCell = [self getLabelAndSwitchCell:tableView forIndexPath:indexPath];
@ -2470,8 +2455,18 @@ SettingsIdentityServerCoordinatorBridgePresenterDelegate>
}
else if (section == SETTINGS_SECTION_USER_SETTINGS_INDEX && row == userSettingsThreePidsInformation)
{
NSIndexPath *discoveryIndexPath = [NSIndexPath indexPathForRow:0 inSection:SETTINGS_SECTION_DISCOVERY_INDEX];
[tableView scrollToRowAtIndexPath:discoveryIndexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
// settingsDiscoveryTableViewSection is a dynamic section, so check number of rows before scroll to avoid crashes
if (self.settingsDiscoveryTableViewSection.numberOfRows > 0)
{
NSIndexPath *discoveryIndexPath = [NSIndexPath indexPathForRow:0 inSection:SETTINGS_SECTION_DISCOVERY_INDEX];
[tableView scrollToRowAtIndexPath:discoveryIndexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
}
else
{
// this won't be precise in scroll location, but seems the best option for now
NSIndexPath *discoveryIndexPath = [NSIndexPath indexPathForRow:0 inSection:SETTINGS_SECTION_DISCOVERY_INDEX + 1];
[tableView scrollToRowAtIndexPath:discoveryIndexPath atScrollPosition:UITableViewScrollPositionMiddle animated:YES];
}
}
else if (section == SETTINGS_SECTION_DISCOVERY_INDEX)
{
@ -2944,66 +2939,6 @@ SettingsIdentityServerCoordinatorBridgePresenterDelegate>
}
}
- (void)toggleSyncWithLazyLoadOfRoomMembers:(id)sender
{
if (sender && [sender isKindOfClass:UISwitch.class])
{
UISwitch *switchButton = (UISwitch*)sender;
if (!switchButton.isOn)
{
// Disable LL and reload
[MXKAppSettings standardAppSettings].syncWithLazyLoadOfRoomMembers = NO;
[self launchClearCache];
}
else
{
switchButton.enabled = NO;
[self startActivityIndicator];
// Check the user homeserver supports lazy-loading
MXKAccount* account = [MXKAccountManager sharedManager].activeAccounts.firstObject;
MXWeakify(self);
[account supportLazyLoadOfRoomMembers:^(BOOL supportLazyLoadOfRoomMembers) {
MXStrongifyAndReturnIfNil(self);
if (supportLazyLoadOfRoomMembers)
{
// Lazy-loading is fully supported, enable it
[MXKAppSettings standardAppSettings].syncWithLazyLoadOfRoomMembers = YES;
[self launchClearCache];
}
else
{
[switchButton setOn:NO animated:YES];
switchButton.enabled = YES;
[self stopActivityIndicator];
// No support of lazy-loading, do not engage it and warn the user
[self->currentAlert dismissViewControllerAnimated:NO completion:nil];
self->currentAlert = [UIAlertController alertControllerWithTitle:nil
message:NSLocalizedStringFromTable(@"settings_labs_room_members_lazy_loading_error_message", @"Vector", nil)
preferredStyle:UIAlertControllerStyleAlert];
MXWeakify(self);
[self->currentAlert addAction:[UIAlertAction actionWithTitle:[NSBundle mxk_localizedStringForKey:@"ok"]
style:UIAlertActionStyleDefault
handler:^(UIAlertAction * action) {
MXStrongifyAndReturnIfNil(self);
self->currentAlert = nil;
}]];
[self->currentAlert mxk_setAccessibilityIdentifier: @"SettingsVCNoHSSupportOfLazyLoading"];
[self presentViewController:self->currentAlert animated:YES completion:nil];
}
}];
}
}
}
- (void)toggleJitsiForConference:(id)sender
{
if (sender && [sender isKindOfClass:UISwitch.class])