Skip to content

Commit 3109bca

Browse files
committed
Merge branch 'develop' into fix/ios-26-swipe-when-sheet
2 parents fdb86a7 + 9e43be3 commit 3109bca

File tree

11 files changed

+35
-40
lines changed

11 files changed

+35
-40
lines changed

.github/actions/xcode-cache/action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ runs:
55
steps:
66
- run: echo "IMAGE=${ImageOS}-${ImageVersion}" >> $GITHUB_ENV
77
shell: bash
8-
- uses: mikehardy/buildcache-action@v2
8+
- name: Cache SPM
9+
uses: actions/cache@v4
10+
id: spm-cache
911
with:
10-
cache_key: ${{ env.IMAGE }}-buildcache-
12+
path: spm_cache
13+
key: ${{ env.IMAGE }}-spm-${{ hashFiles('**/Package.resolved') }}
14+
restore-keys: ${{ env.IMAGE }}-spm-

.github/workflows/cron-checks.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,28 +21,25 @@ jobs:
2121
strategy:
2222
matrix:
2323
include:
24-
# - ios: "26.0" TODO: IOS-1181
24+
# - ios: "26.1" # TODO: IOS-1181
2525
# device: "iPhone 17 Pro"
26-
# xcode: "26.0.1"
2726
# setup_runtime: false
2827
- ios: "18.5"
2928
device: "iPhone 16 Pro"
30-
xcode: "26.0.1"
3129
setup_runtime: false
3230
- ios: "17.5"
3331
device: "iPhone 15 Pro"
34-
xcode: "26.0.1"
3532
setup_runtime: true
3633
- ios: "16.4"
3734
device: "iPhone 14 Pro"
38-
xcode: "16.4"
3935
setup_runtime: true
4036
fail-fast: false
4137
runs-on: macos-15
4238
env:
4339
GITHUB_EVENT: ${{ toJson(github.event) }}
4440
ALLURE_TOKEN: ${{ secrets.ALLURE_TOKEN }}
45-
XCODE_VERSION: ${{ matrix.xcode }}
41+
XCODE_VERSION: "26.1.1"
42+
IOS_SIMULATOR_DEVICE: "${{ matrix.device }} (${{ matrix.ios }})"
4643
steps:
4744
- uses: actions/checkout@v4.1.1
4845
- uses: ./.github/actions/bootstrap
@@ -63,7 +60,7 @@ jobs:
6360
- name: Launch Allure TestOps
6461
run: bundle exec fastlane allure_launch cron:true
6562
- name: Run UI Tests (Debug)
66-
run: bundle exec fastlane test_e2e_mock device:"${{ matrix.device }} (${{ matrix.ios }})"
63+
run: bundle exec fastlane test_e2e_mock device:"${{ env.IOS_SIMULATOR_DEVICE }}"
6764
timeout-minutes: 90
6865
- name: Allure TestOps Upload
6966
if: success() || failure()
@@ -92,7 +89,7 @@ jobs:
9289
strategy:
9390
matrix:
9491
include:
95-
- xcode: 26.0.1 # swift 6.2
92+
- xcode: 26.1.1 # swift 6.2
9693
os: macos-15
9794
- xcode: 16.4 # swift 6.1
9895
os: macos-15

.github/workflows/smoke-checks.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ concurrency:
2020

2121
env:
2222
HOMEBREW_NO_INSTALL_CLEANUP: 1 # Disable cleanup for homebrew, we don't need it on CI
23-
IOS_SIMULATOR_DEVICE: "iPhone 16 Pro (18.5)"
23+
IOS_SIMULATOR_DEVICE: "iPhone 17 Pro (26.1)"
2424
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2525
GITHUB_PR_NUM: ${{ github.event.pull_request.number }}
2626

@@ -92,8 +92,6 @@ jobs:
9292
runs-on: macos-15
9393
env:
9494
GITHUB_TOKEN: ${{ secrets.CI_BOT_GITHUB_TOKEN }} # to open a PR
95-
IOS_SIMULATOR_DEVICE: "iPhone 16 Pro (18.5)" # TODO: IOS-1181
96-
XCODE_VERSION: "16.4" # TODO: IOS-1181
9795
steps:
9896
- uses: actions/checkout@v4.1.1
9997
- uses: ./.github/actions/bootstrap
@@ -160,7 +158,6 @@ jobs:
160158
env:
161159
LAUNCH_ID: ${{ needs.allure_testops_launch.outputs.launch_id }}
162160
IOS_SIMULATOR_DEVICE: "iPhone 16 Pro (18.5)" # TODO: IOS-1181
163-
XCODE_VERSION: "16.4" # TODO: IOS-1181
164161
strategy:
165162
matrix:
166163
batch: [0, 1]

.swiftformat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Stream rules
22
--header "\nCopyright © {year} Stream.io Inc. All rights reserved.\n"
3-
--swiftversion 5.9
3+
--swiftversion 5.10
44

55
# Use allow-list
66
--rules blankLinesAroundMark

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
55

66
### ✅ Added
77
- Open `ChatChannelInfoViewModel.leaveButtonTitle` and `ChatChannelInfoViewModel.leaveConversationDescription` [#1018](https://github.com/GetStream/stream-chat-swiftui/pull/1018)
8+
- Open `ChatThreadListViewModel.preselectThreadIfNeeded()` [#1069](https://github.com/GetStream/stream-chat-swiftui/pull/1069)
89
### 🐞 Fixed
910
- Use `muteChannel` capability for showing mute channel button in the `ChatChannelInfoView` [#1018](https://github.com/GetStream/stream-chat-swiftui/pull/1018)
1011
- Fix `PollOptionAllVotesViewModel` not loading more votes [#1067](https://github.com/GetStream/stream-chat-swiftui/pull/1067)

Package.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// swift-tools-version:5.9
1+
// swift-tools-version:5.10
22

33
import Foundation
44
import PackageDescription

Scripts/bootstrap.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ if [ "${SKIP_SWIFT_BOOTSTRAP:-}" != true ]; then
3030
puts "Install SwiftLint v${SWIFT_LINT_VERSION}"
3131
DOWNLOAD_URL="https://github.com/realm/SwiftLint/releases/download/${SWIFT_LINT_VERSION}/SwiftLint.pkg"
3232
DOWNLOAD_PATH="/tmp/SwiftLint-${SWIFT_LINT_VERSION}.pkg"
33-
curl -sL "$DOWNLOAD_URL" -o "$DOWNLOAD_PATH"
33+
wget "$DOWNLOAD_URL" -O "$DOWNLOAD_PATH"
3434
sudo installer -pkg "$DOWNLOAD_PATH" -target /
3535
swiftlint version
3636

@@ -39,7 +39,7 @@ if [ "${SKIP_SWIFT_BOOTSTRAP:-}" != true ]; then
3939
DOWNLOAD_PATH="/tmp/swiftformat-${SWIFT_FORMAT_VERSION}.zip"
4040
BIN_PATH="/usr/local/bin/swiftformat"
4141
brew uninstall swiftformat || true
42-
curl -sL "$DOWNLOAD_URL" -o "$DOWNLOAD_PATH"
42+
wget "$DOWNLOAD_URL" -O "$DOWNLOAD_PATH"
4343
unzip -o "$DOWNLOAD_PATH" -d /tmp/swiftformat-${SWIFT_FORMAT_VERSION}
4444
sudo mv /tmp/swiftformat-${SWIFT_FORMAT_VERSION}/swiftformat "$BIN_PATH"
4545
sudo chmod +x "$BIN_PATH"
@@ -50,7 +50,7 @@ if [ "${SKIP_SWIFT_BOOTSTRAP:-}" != true ]; then
5050
DOWNLOAD_PATH="/tmp/swiftgen-${SWIFT_GEN_VERSION}.zip"
5151
INSTALL_DIR="/usr/local/lib/swiftgen"
5252
BIN_PATH="/usr/local/bin/swiftgen"
53-
curl -sL "$DOWNLOAD_URL" -o "$DOWNLOAD_PATH"
53+
wget "$DOWNLOAD_URL" -O "$DOWNLOAD_PATH"
5454
sudo rm -rf "$INSTALL_DIR"
5555
sudo mkdir -p "$INSTALL_DIR"
5656
sudo unzip -o "$DOWNLOAD_PATH" -d "$INSTALL_DIR"
@@ -62,7 +62,7 @@ fi
6262
if [[ ${INSTALL_SONAR-default} == true ]]; then
6363
puts "Install sonar scanner v${SONAR_VERSION}"
6464
DOWNLOAD_URL="https://binaries.sonarsource.com/Distribution/sonar-scanner-cli/sonar-scanner-cli-${SONAR_VERSION}-macosx-x64.zip"
65-
curl -sL "${DOWNLOAD_URL}" -o ./fastlane/sonar.zip
65+
wget "${DOWNLOAD_URL}" -O ./fastlane/sonar.zip
6666
cd fastlane
6767
unzip sonar.zip
6868
rm sonar.zip
@@ -74,12 +74,12 @@ fi
7474
if [[ ${INSTALL_ALLURE-default} == true ]]; then
7575
puts "Install allurectl v${ALLURECTL_VERSION}"
7676
DOWNLOAD_URL="https://github.com/allure-framework/allurectl/releases/download/${ALLURECTL_VERSION}/allurectl_darwin_amd64"
77-
curl -sL "${DOWNLOAD_URL}" -o ./fastlane/allurectl
77+
wget "${DOWNLOAD_URL}" -O ./fastlane/allurectl
7878
chmod +x ./fastlane/allurectl
7979

8080
puts "Install xcresults v${XCRESULTS_VERSION}"
8181
DOWNLOAD_URL="https://github.com/eroshenkoam/xcresults/releases/download/${XCRESULTS_VERSION}/xcresults"
82-
curl -sL "${DOWNLOAD_URL}" -o ./fastlane/xcresults
82+
wget "${DOWNLOAD_URL}" -O ./fastlane/xcresults
8383
chmod +x ./fastlane/xcresults
8484
fi
8585

Sources/StreamChatSwiftUI/ChatThreadList/ChatThreadListViewModel.swift

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,15 @@ open class ChatThreadListViewModel: ObservableObject, ChatThreadListControllerDe
155155
}
156156
}
157157

158+
/// Preselects the the thread if needed, for example, when inside an iPad Split View.
159+
open func preselectThreadIfNeeded() {
160+
guard isIPad else { return }
161+
guard let firstThread = threads.first else { return }
162+
guard selectedThread == nil else { return }
163+
164+
selectedThread = .init(thread: firstThread)
165+
}
166+
158167
public func controller(
159168
_ controller: ChatThreadListController,
160169
didChangeThreads changes: [ListChange<ChatThread>]
@@ -184,12 +193,4 @@ open class ChatThreadListViewModel: ObservableObject, ChatThreadListControllerDe
184193
private func makeDefaultEventsController() {
185194
eventsController = chatClient.eventsController()
186195
}
187-
188-
private func preselectThreadIfNeeded() {
189-
guard isIPad else { return }
190-
guard let firstThread = threads.first else { return }
191-
guard selectedThread == nil else { return }
192-
193-
selectedThread = .init(thread: firstThread)
194-
}
195196
}

StreamChatSwiftUI-XCFramework.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Pod::Spec.new do |spec|
88
spec.license = { type: 'BSD-3', file: 'LICENSE' }
99
spec.author = { 'getstream.io' => 'support@getstream.io' }
1010
spec.social_media_url = 'https://getstream.io'
11-
spec.swift_version = '5.9'
11+
spec.swift_version = '5.10'
1212
spec.platform = :ios, '14.0'
1313
spec.requires_arc = true
1414

StreamChatSwiftUI.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Pod::Spec.new do |spec|
88
spec.license = { type: 'BSD-3', file: 'LICENSE' }
99
spec.author = { 'getstream.io' => 'support@getstream.io' }
1010
spec.social_media_url = 'https://getstream.io'
11-
spec.swift_version = '5.9'
11+
spec.swift_version = '5.10'
1212
spec.platform = :ios, '14.0'
1313
spec.source = { git: 'https://github.com/GetStream/stream-chat-swiftui.git', tag: spec.version }
1414
spec.requires_arc = true

0 commit comments

Comments
 (0)