Merge branch 'develop' into voip_design_updates

This commit is contained in:
ismailgulek 2021-04-29 10:50:04 +03:00
commit 6abbef4ae7
No known key found for this signature in database
GPG key ID: E96336D42D9470A9
6 changed files with 40 additions and 12 deletions

View file

@ -9,6 +9,10 @@ on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
env:
# Make the git branch for a PR available to our Fastfile
MX_GIT_BRANCH: ${{ github.event.pull_request.head.ref }}
jobs:
build:
name: Build
@ -39,7 +43,7 @@ jobs:
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Use right MatrixKit and MatrixSDK versions
run: bundle exec fastlane point_dependencies_to_pending_releases
run: bundle exec fastlane point_dependencies_to_related_branches
# Main step
- name: Build iOS simulator
@ -75,7 +79,7 @@ jobs:
bundle config path vendor/bundle
bundle install --jobs 4 --retry 3
- name: Use right MatrixKit and MatrixSDK versions
run: bundle exec fastlane point_dependencies_to_pending_releases
run: bundle exec fastlane point_dependencies_to_related_branches
# Main step
- name: Unit tests

View file

@ -10,6 +10,8 @@ Changes to be released in next version
🐛 Bugfix
* RoomVC: Avoid navigation to integration management using integration popup with settings set to integration disabled (#4261).
* RiotSettings: Logging out resets RiotSettings (#4259).
* RoomVC: Crash in `setScrollToBottomHidden` method (#4270).
* Notifications: Make them work in debug mode (#4274).
⚠️ API Changes
*
@ -18,7 +20,7 @@ Changes to be released in next version
*
🧱 Build
*
* GH Actions: Make jobs use the right version of MatrixKit and MatrixSDK.
Others
*

View file

@ -44,6 +44,9 @@ class AppConfiguration: CommonConfiguration {
// Each room member will be considered as a potential contact.
MXKContactManager.shared().contactManagerMXRoomSource = MXKContactManagerMXRoomSource.all
// Use UIKit BackgroundTask for handling background tasks in the SDK
MXSDKOptions.sharedInstance().backgroundModeHandler = MXUIKitBackgroundModeHandler()
// Enable key backup on app
MXSDKOptions.sharedInstance().enableKeyBackupWhenStartingMXCrypto = true
}

View file

@ -63,11 +63,6 @@ class CommonConfiguration: NSObject, Configurable {
// Disable identicon use
sdkOptions.disableIdenticonUseForUserAvatar = true
DispatchQueue.main.async {
// Use UIKit BackgroundTask for handling background tasks in the SDK
sdkOptions.backgroundModeHandler = MXUIKitBackgroundModeHandler()
}
// Pass httpAdditionalHeaders to the SDK
sdkOptions.httpAdditionalHeaders = BuildSettings.httpAdditionalHeaders

View file

@ -1384,8 +1384,7 @@ const NSTimeInterval kResizeComposerAnimationDuration = .05;
if (roomDataSource.currentTypingUsers && !roomDataSource.currentTypingUsers.count)
{
[roomDataSource resetTypingNotification];
NSInteger count = [self.bubblesTableView numberOfRowsInSection:0];
[self.bubblesTableView deleteRowsAtIndexPaths:@[[NSIndexPath indexPathForRow:count - 1 inSection:0]] withRowAnimation:UITableViewRowAnimationNone];
[self.bubblesTableView reloadData];
}
}

View file

@ -57,6 +57,18 @@ platform :ios do
#
end
desc "Point MatrixKit and MatrixSDK to the related branches if such ones exist"
lane :point_dependencies_to_related_branches do
current_branch = mx_git_branch
UI.message("Current branch: #{current_branch}")
if current_branch.start_with?("release/")
point_dependencies_to_pending_releases
else
point_dependencies_to_same_feature
end
end
desc "Point MatrixKit and MatrixSDK to their respective release/*/release branch if they exist, develop otherwise"
lane :point_dependencies_to_pending_releases do
edit_podfile(branch_pattern: "release/*/release")
@ -64,7 +76,7 @@ platform :ios do
desc "Point MatrixKit and MatrixSDK to the branch with the same name as the current branch if such one exist, develop otherwise"
lane :point_dependencies_to_same_feature do
edit_podfile(branch_pattern: git_branch) unless git_branch.to_s.empty?
edit_podfile(branch_pattern: mx_git_branch) unless mx_git_branch.to_s.empty?
end
desc "Build the app for simulator to ensure it compiles"
@ -117,7 +129,7 @@ platform :ios do
git_branch_name = options[:git_tag]
if git_branch_name.to_s.empty?
# Retrieve the current git branch as a fallback
git_branch_name = git_branch
git_branch_name = mx_git_branch
end
UI.user_error!("Unable to retrieve GIT tag or branch") unless !git_branch_name.to_s.empty?
@ -351,6 +363,19 @@ platform :ios do
UI.command_output("Content of modified Podfile:\n" + podfile_content)
end
# git_branch can return an empty screen with some CI tools (like GH actions)
# The CI build script needs to define MX_GIT_BRANCH with the right branch.
def mx_git_branch
mx_git_branch = git_branch
if mx_git_branch == ""
ensure_env_vars(
env_vars: ['MX_GIT_BRANCH']
)
mx_git_branch = ENV["MX_GIT_BRANCH"]
end
return mx_git_branch
end
# Find the latest branch with the given name pattern in the given repo
def find_branch(repo_slug, pattern)
list = `git ls-remote --heads --sort=version:refname https://github.com/#{repo_slug} #{pattern}`