Skip to content

Commit 7778b04

Browse files
committed
chore: update files from base branch
2 parents 0417f26 + 4a6b7f9 commit 7778b04

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+730
-373
lines changed

.github/workflows/check-pr.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
- develop
77
- main
88
- 'v[0-9]+.[0-9]+.[0-9]+*beta*'
9-
- V7
109
types: [opened, synchronize]
1110

1211
jobs:

.github/workflows/lint-pr-title.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
branches:
66
- develop
77
- 'v[0-9]+.[0-9]+.[0-9]+'
8-
- V7
98
types: [opened, edited, synchronize]
109

1110
jobs:

.github/workflows/next-release.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ on:
44
push:
55
branches:
66
- develop
7-
- V7
87

98
jobs:
109
publish-next:

.github/workflows/sample-distribution.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313

1414
jobs:
1515
build_and_deploy_ios_testflight_qa:
16-
name: Build SampleApp iOS and Deploy-${{ github.ref == 'refs/heads/V7' }}
16+
name: Build SampleApp iOS and Deploy-${{ github.ref == 'refs/heads/develop' }}
1717
runs-on: [macos-15]
1818
steps:
1919
- name: Connect Bot
@@ -38,14 +38,14 @@ jobs:
3838
bundle exec pod install
3939
- name: Build and release Testflight QA
4040
working-directory: examples/SampleApp
41-
run: bundle exec fastlane deploy_to_testflight_qa deploy:${{ github.ref == 'refs/heads/V7' }};
41+
run: bundle exec fastlane deploy_to_testflight_qa deploy:${{ github.ref == 'refs/heads/develop' }};
4242
env:
4343
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
4444
MATCH_GIT_BASIC_AUTHORIZATION: ${{ secrets.MATCH_GIT_BASIC_AUTHORIZATION }}
4545
APPSTORE_API_KEY: ${{ secrets.APPSTORE_API_KEY }}
4646

4747
build_and_deploy_android_s3:
48-
name: Build SampleApp Android and Deploy-${{ github.ref == 'refs/heads/V7' }}
48+
name: Build SampleApp Android and Deploy-${{ github.ref == 'refs/heads/develop' }}
4949
runs-on: ubuntu-latest
5050
steps:
5151
- uses: actions/checkout@v2
@@ -66,13 +66,13 @@ jobs:
6666
rm -rf $HOME/.gradle/caches/ && ./gradlew assembleRelease
6767
- name: Configure AWS credentials
6868
uses: aws-actions/configure-aws-credentials@v1
69-
if: ${{ github.ref == 'refs/heads/V7' }}
69+
if: ${{ github.ref == 'refs/heads/develop' }}
7070
with:
7171
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
7272
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
7373
aws-region: us-east-1
7474
- name: Upload APK
75-
if: ${{ github.ref == 'refs/heads/V7' }}
75+
if: ${{ github.ref == 'refs/heads/develop' }}
7676
# https://getstream.io/downloads/rn-sample-app.apk
7777
run: |
7878
cp examples/SampleApp/android/app/build/outputs/apk/release/app-release.apk rn-sample-app.apk

.github/workflows/sdk-size-metrics.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ on:
99
branches:
1010
- develop
1111
- main
12-
- V7
1312

1413
env:
1514
HOMEBREW_NO_INSTALL_CLEANUP: 1 # Disable cleanup for homebrew, we don't need it on CI

examples/SampleApp/android/app/build.gradle

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,15 +126,14 @@ dependencies {
126126
implementation platform('com.google.firebase:firebase-bom:29.3.0')
127127
implementation("androidx.swiperefreshlayout:swiperefreshlayout:1.0.0")
128128

129-
// For animated GIF support
130-
implementation 'com.facebook.fresco:animated-gif:2.6.0'
131-
132129
// For React native video
133130
implementation "androidx.appcompat:appcompat:1.0.0"
134131

132+
// For animated GIF support
133+
implementation('com.facebook.fresco:animated-gif:3.6.0')
135134
// For WebP support, including animated WebP
136-
implementation 'com.facebook.fresco:animated-webp:2.6.0'
137-
implementation 'com.facebook.fresco:webpsupport:2.6.0'
135+
implementation('com.facebook.fresco:animated-webp:3.6.0')
136+
implementation('com.facebook.fresco:webpsupport:3.6.0')
138137

139138
// For Firebase Crashlytics and Analytics support
140139
implementation 'com.google.firebase:firebase-crashlytics'

examples/TypeScriptMessaging/android/app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -120,8 +120,8 @@ dependencies {
120120
// For React native video
121121
implementation("androidx.appcompat:appcompat:1.0.0")
122122
// For animated GIF support
123-
implementation('com.facebook.fresco:animated-gif:2.6.0')
123+
implementation('com.facebook.fresco:animated-gif:3.6.0')
124124
// For WebP support, including animated WebP
125-
implementation('com.facebook.fresco:animated-webp:2.6.0')
126-
implementation('com.facebook.fresco:webpsupport:2.6.0')
125+
implementation('com.facebook.fresco:animated-webp:3.6.0')
126+
implementation('com.facebook.fresco:webpsupport:3.6.0')
127127
}

package/src/components/Attachment/AudioAttachment.tsx

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { I18nManager, Pressable, StyleSheet, Text, View } from 'react-native';
44
import dayjs from 'dayjs';
55
import duration from 'dayjs/plugin/duration';
66

7+
import { AudioAttachment as StreamAudioAttachment } from 'stream-chat';
8+
79
import { useTheme } from '../../contexts';
810
import { useAudioPlayer } from '../../hooks/useAudioPlayer';
911
import { Audio, Pause, Play } from '../../icons';
@@ -22,19 +24,18 @@ import { WaveProgressBar } from '../ProgressControl/WaveProgressBar';
2224

2325
dayjs.extend(duration);
2426

25-
export type AudioAttachmentType = AudioConfig & {
26-
asset_url?: string;
27-
id: string;
28-
title?: string;
29-
type: 'audio' | 'voiceRecording';
30-
waveform_data?: number[];
31-
};
27+
export type AudioAttachmentType = AudioConfig &
28+
Pick<StreamAudioAttachment, 'waveform_data' | 'asset_url' | 'title'> & {
29+
id: string;
30+
type: 'audio' | 'voiceRecording';
31+
};
3232

3333
export type AudioAttachmentProps = {
3434
item: AudioAttachmentType;
3535
onLoad: (index: string, duration: number) => void;
3636
onPlayPause: (index: string, pausedStatus?: boolean) => void;
3737
onProgress: (index: string, progress: number) => void;
38+
titleMaxLength?: number;
3839
hideProgressBar?: boolean;
3940
showSpeedSettings?: boolean;
4041
testID?: string;
@@ -56,6 +57,7 @@ export const AudioAttachment = (props: AudioAttachmentProps) => {
5657
onProgress,
5758
showSpeedSettings = false,
5859
testID,
60+
titleMaxLength,
5961
} = props;
6062
const { changeAudioSpeed, pauseAudio, playAudio, seekAudio } = useAudioPlayer({ soundRef });
6163
const isExpoCLI = NativeHandlers.SDK === 'stream-chat-expo';
@@ -263,7 +265,7 @@ export const AudioAttachment = (props: AudioAttachmentProps) => {
263265
},
264266
colors: { accent_blue, black, grey_dark, grey_whisper, static_black, static_white, white },
265267
messageInput: {
266-
fileUploadPreview: { filenameText },
268+
fileAttachmentUploadPreview: { filenameText },
267269
},
268270
},
269271
} = useTheme();
@@ -326,7 +328,9 @@ export const AudioAttachment = (props: AudioAttachmentProps) => {
326328
filenameText,
327329
]}
328330
>
329-
{getTrimmedAttachmentTitle(item.title)}
331+
{item.type === FileTypes.VoiceRecording
332+
? 'Recording'
333+
: getTrimmedAttachmentTitle(item.title, titleMaxLength)}
330334
</Text>
331335
<View style={styles.audioInfo}>
332336
<Text style={[styles.progressDurationText, { color: grey_dark }, progressDurationText]}>

package/src/components/Attachment/FileAttachmentGroup.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ type FilesToDisplayType = Attachment & {
3939

4040
const FileAttachmentGroupWithContext = (props: FileAttachmentGroupPropsWithContext) => {
4141
const { Attachment, AudioAttachment, files, messageId, styles: stylesProp = {} } = props;
42-
const [filesToDisplay, setFilesToDisplay] = useState<FilesToDisplayType[]>([]);
42+
const [filesToDisplay, setFilesToDisplay] = useState<FilesToDisplayType[]>(() =>
43+
files.map((file) => ({ ...file, duration: file.duration || 0, paused: true, progress: 0 })),
44+
);
4345

4446
useEffect(() => {
4547
setFilesToDisplay(
@@ -111,14 +113,9 @@ const FileAttachmentGroupWithContext = (props: FileAttachmentGroupPropsWithConte
111113
isSoundPackageAvailable() ? (
112114
<AudioAttachment
113115
item={{
114-
asset_url: file.asset_url,
115-
duration: file.duration,
116+
...file,
116117
id: index.toString(),
117-
paused: file.paused,
118-
progress: file.progress,
119-
title: file.title,
120118
type: file.type,
121-
waveform_data: file.waveform_data,
122119
}}
123120
onLoad={onLoad}
124121
onPlayPause={onPlayPause}

package/src/components/Attachment/Gallery.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import { getGalleryImageBorderRadius } from './utils/getGalleryImageBorderRadius
1111

1212
import { openUrlSafely } from './utils/openUrlSafely';
1313

14+
import { useTranslationContext } from '../../contexts';
1415
import { useChatConfigContext } from '../../contexts/chatConfigContext/ChatConfigContext';
1516
import {
1617
ImageGalleryContextValue,
@@ -29,7 +30,7 @@ import {
2930
useOverlayContext,
3031
} from '../../contexts/overlayContext/OverlayContext';
3132
import { useTheme } from '../../contexts/themeContext/ThemeContext';
32-
import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
33+
3334
import { useLoadingImage } from '../../hooks/useLoadingImage';
3435
import { isVideoPlayerAvailable } from '../../native';
3536
import { FileTypes } from '../../types/types';

0 commit comments

Comments
 (0)