Skip to content

Commit f372769

Browse files
authored
fix: initial scroll to first unread v5 (#3016)
* fix: initial scrolling to first unread message on v5 * fix: ios sample app build on v5 * fix: actions/cache ersion bump
1 parent 0a1a664 commit f372769

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/workflows/sample-distribution.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
jobs:
1515
build_and_deploy_ios_testflight_qa:
1616
name: Build SampleApp iOS and Deploy-${{ github.ref == 'refs/heads/V5' }}
17-
runs-on: [macos-14]
17+
runs-on: [macos-15]
1818
steps:
1919
- name: Connect Bot
2020
uses: webfactory/[email protected]
@@ -25,15 +25,17 @@ jobs:
2525
- name: Install && Build - SDK and Sample App
2626
uses: ./.github/actions/install-and-build-sdk
2727
- name: Cache iOS pods
28-
uses: actions/cache@v2
28+
uses: actions/cache@v4
2929
with:
3030
path: examples/SampleApp/ios/Pods
3131
key: ${{ runner.os }}-pods-${{ hashFiles('examples/SampleApp/ios/Podfile.lock') }}
3232
restore-keys: |
3333
${{ runner.os }}-pods-
3434
- name: iOS Pods setup
3535
working-directory: examples/SampleApp/ios
36-
run: bundle exec pod install
36+
run: |
37+
pod update hermes-engine --no-repo-update
38+
bundle exec pod install
3739
- name: Build and release Testflight QA
3840
working-directory: examples/SampleApp
3941
run: bundle exec fastlane deploy_to_testflight_qa deploy:${{ github.ref == 'refs/heads/V5' }};

package/src/components/Channel/Channel.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export const reactionData: ReactionData[] = [
203203
* If count of unread messages is less than 4, then no need to scroll to first unread message,
204204
* since first unread message will be in visible frame anyways.
205205
*/
206-
const scrollToFirstUnreadThreshold = 4;
206+
const scrollToFirstUnreadThreshold = 0;
207207

208208
const defaultThrottleInterval = 500;
209209
const defaultDebounceInterval = 500;
@@ -1042,6 +1042,7 @@ const ChannelWithContext = <
10421042
},
10431043
() => {
10441044
if (unreadMessageIdToScrollTo) {
1045+
setTargetedMessage(unreadMessageIdToScrollTo);
10451046
restartSetsMergeFuncRef.current();
10461047
}
10471048
},

0 commit comments

Comments
 (0)