Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
60f781d
Bump version to 4.30.0 (#4378)
diegolmello Jul 18, 2022
1c1dfe5
[FIX] Share Extension shows a server that has no user logged in (#4336)
dnlsilva Jul 20, 2022
376c8e8
[IMPROVE] Add support to Linebreak and Katex on markdown (#4361)
dnlsilva Jul 20, 2022
a965465
[FIX] Add support to non ascii url characters on ios devices (#4364)
dnlsilva Jul 28, 2022
d7f7b1d
[FIX] iFrame login takes user to blank screen (#4389)
reinaldonetof Jul 29, 2022
0e378c6
Chore: Try Github Actions (#4376)
dnlsilva Jul 29, 2022
5875454
[FIX] Github Actions folder (#4400)
dnlsilva Jul 29, 2022
41dbbf4
Chore: Migrate NotificationPreferencesView to hooks (#4327)
dnlsilva Aug 1, 2022
2c32be6
[FIX] Fix display order render on RoomListView (#4392)
dnlsilva Aug 1, 2022
a4f171a
[NEW] Redesign reactions list (#4346)
try-catch-stack Aug 3, 2022
e38aedc
[IMPROVE] Add emoji picker to iOS (#4366)
reinaldonetof Aug 8, 2022
2b08b68
Chore: Upgrade React Native to 0.68.2 (#4316)
dnlsilva Aug 8, 2022
89820b2
[NEW] Create useEndpointData for call endpoints using hooks (#4342)
dnlsilva Aug 9, 2022
6df34a2
Chore: Remove github actions (#4425)
dnlsilva Aug 9, 2022
6b8086a
[FIX] Markdown's ListItem not using the entered index (#4388)
dnlsilva Aug 11, 2022
a101d31
Chore: Migrate WithoutServerView to hooks (#4415)
dnlsilva Aug 11, 2022
92111af
Chore: Migrate E2EHowItWorksView to hooks (#4416)
dnlsilva Aug 11, 2022
69349de
Chore: Migrate E2EEnterYourPasswordView to hooks (#4423)
dnlsilva Aug 11, 2022
2a52215
Chore: Ignore icons on Prettier (#4426)
reinaldonetof Aug 11, 2022
999e8ab
Regression: Room header not showing room type when not joined (#4427)
reinaldonetof Aug 11, 2022
0c8177e
[FIX] Text composer is pushing modals outside the screen on Android's…
reinaldonetof Aug 11, 2022
b389427
Regression: Resume the app with a deep link not navigating (#4428)
diegolmello Aug 11, 2022
c6e31df
[FIX] Can't connect to RC through Gitlab Oauth (#4421)
PetMoln Aug 12, 2022
a607980
[IMPROVE] Set native theme when launching the share extension (#4430)
dnlsilva Aug 16, 2022
c4d3af0
[FIX] Requests being skipped after reconnecting on onboarding (#4429)
diegolmello Aug 17, 2022
585e5a0
Chore: Migrate Touch to hooks (#4422)
dnlsilva Aug 17, 2022
28043a2
Chore: Migrate E2ESaveYourPasswordView to hooks (#4432)
dnlsilva Aug 17, 2022
31a8c3e
[FIX] Add method and id to method calls (#4444)
dnlsilva Aug 17, 2022
3ac10ee
Chore: Hooks app/views/SelectServerView (#4445)
reinaldonetof Aug 18, 2022
f0ed501
Chore: Hooks App/share (#4417)
reinaldonetof Aug 18, 2022
6b3006d
[NEW] Persist audio files (#4448)
dnlsilva Aug 19, 2022
ded2f37
Chore: Hooks app/views/DefaultBrowserView (#4424)
reinaldonetof Aug 19, 2022
fa72d4c
[FIX] Pagination when search by members and fix the duplicated member…
reinaldonetof Aug 19, 2022
e723990
Chore: Update Storybook libs to v6 (#4439)
diegolmello Aug 19, 2022
17be449
[FIX] Jump to message stuck on loading animation (#4410)
diegolmello Aug 19, 2022
ba15bc9
[NEW] Use Inter font (#4459)
diegolmello Aug 23, 2022
ccbc84f
[IMPROVE] Remove show message in main thread preference (#4435)
reinaldonetof Aug 25, 2022
cbc6892
[NEW] Unify members section (#4399)
dnlsilva Aug 26, 2022
9cbffff
[IMPROVE] Redesign create room flow (#4381)
reinaldonetof Aug 26, 2022
991d715
Regression: Jump to message from search view (#4476)
reinaldonetof Aug 30, 2022
8d26230
[FIX] Wrong Team's icon on SelectTeam item's list (#4469)
dnlsilva Sep 5, 2022
e3a99a9
[FIX] Add loading prop on RoomActionsView to avoid double click (#4462)
dnlsilva Sep 5, 2022
eabb9f1
Chore: Hooks app/views/SetUsernameView (#4488)
reinaldonetof Sep 6, 2022
c9ce529
Chore: Hooks app/views/ForgotPasswordView (#4485)
reinaldonetof Sep 6, 2022
c1a4ddc
[FIX] System messages should be not italic (#4484)
reinaldonetof Sep 6, 2022
f9f13e7
[FIX] Remove the tmid parameter when it is empty (#4500)
dnlsilva Sep 8, 2022
1bc3f54
Regression: Create private team and channel as default (#4493)
reinaldonetof Sep 9, 2022
cf7b9a0
[FIX] When creating a new user, "Custom Fields" are breaking function…
dnlsilva Sep 9, 2022
6484edd
Regression: Jitsi not leaving call properly (#4511)
dnlsilva Sep 9, 2022
07f0618
[FIX] Big usernames during discussion creation bugs UI (#4499)
dnlsilva Sep 9, 2022
989ced8
Chore: Improve code and migrate some props to hooks on ThemeView (#4414)
dnlsilva Sep 12, 2022
bb880f0
Chore: Migrate E2E tests from JS to TS (#4475)
reinaldonetof Sep 12, 2022
cc28acd
Bump version to 4.31.0 (#4523)
diegolmello Sep 13, 2022
f0a1266
[FIX] Support Android SDK 31 (#4522)
diegolmello Sep 13, 2022
ac01aca
Chore: Upgrade Expo to SDK 46 (#4463)
diegolmello Sep 13, 2022
92a63e6
Chore: Remove unused iOS permissions (#4524)
diegolmello Sep 15, 2022
aefb60b
[FIX]Update profile name (#4513)
reinaldonetof Sep 16, 2022
e146cba
Chore: Create useDebounce hook (#4470)
dnlsilva Sep 16, 2022
05c1798
[FIX] Decrease space between sections on List (#4520)
reinaldonetof Sep 19, 2022
18f359a
Regression: Poor performance in messages list on Android (#4536)
diegolmello Sep 22, 2022
dec5c44
Regression: Push notifications not working after update to Android 12…
diegolmello Sep 22, 2022
214e1cc
[FIX] Apply thicker border width and remove fixed height on TextInput…
reinaldonetof Sep 22, 2022
b3a2863
Chore: Hooks app/views/UserNotificationPreferenceView (#4502)
reinaldonetof Sep 22, 2022
9d69c10
Chore: Hooks app/views/LanguageView (#4537)
reinaldonetof Sep 22, 2022
e10de8b
[FIX] Search in Rooms List crashes Android app (#4546)
reinaldonetof Sep 23, 2022
5771dbd
[FIX] SearchBox background and unify usage (#4519)
reinaldonetof Sep 23, 2022
d1e2c3f
[FIX] Fix filenames and servers url when downloading audio files (#4553)
dnlsilva Sep 23, 2022
ee1b09d
Regression: Default Browser View title (#4556)
reinaldonetof Sep 23, 2022
cbf9ae3
[FIX] Decrease space between sections on lists (#4543)
reinaldonetof Sep 23, 2022
e883795
[FIX] Reply and deep link from push notifications not working on iOS …
diegolmello Sep 23, 2022
d2d1d78
Regression: Local search is returning wrong object (#4567)
reinaldonetof Sep 27, 2022
e48788c
Regression: Inconsistent style on TextInput on iOS and Android (#4569)
reinaldonetof Sep 27, 2022
e6e2266
Merge branch 'master' into beta
diegolmello Sep 27, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,22 +156,6 @@ module.exports = {
__DEV__: true
},
overrides: [
{
files: ['e2e/**'],
globals: {
by: true,
detox: true,
device: true,
element: true,
expect: true,
waitFor: true
},
rules: {
'import/no-extraneous-dependencies': 0,
'no-await-in-loop': 0,
'no-restricted-syntax': 0
}
},
{
files: ['**/*.ts', '**/*.tsx'],
extends: [
Expand Down Expand Up @@ -253,6 +237,23 @@ module.exports = {
}
}
}
},
{
files: ['e2e/**'],
globals: {
by: true,
detox: true,
device: true,
element: true,
waitFor: true
},
rules: {
'import/no-extraneous-dependencies': 0,
'no-await-in-loop': 0,
'no-restricted-syntax': 0,
// TODO: remove this rule when update Detox to 20 and test if the namespace Detox is available
'no-undef': 1
}
}
]
};
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -66,5 +66,6 @@ artifacts
e2e/docker/rc_test_env/docker-compose.yml
e2e/docker/data/db
e2e/e2e_account.js
e2e/e2e_account.ts

*.p8
14 changes: 7 additions & 7 deletions __tests__/containers/List/__snapshots__/List.stories.storyshot

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Storyshots SearchBox Basic 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"testID\\":\\"searchbox\\"},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"marginBottom\\":10},{\\"margin\\":16,\\"marginBottom\\":16}]},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"position\\":\\"relative\\"}},\\"children\\":[{\\"type\\":\\"TextInput\\",\\"props\\":{\\"style\\":[{\\"color\\":\\"#0d0e12\\"},[{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\",\\"height\\":48,\\"fontSize\\":16,\\"padding\\":14,\\"borderWidth\\":0.5,\\"borderRadius\\":2},null,{\\"paddingRight\\":45},{\\"backgroundColor\\":\\"#ffffff\\",\\"borderColor\\":\\"#cbcbcc\\",\\"color\\":\\"#0d0e12\\"},null,null],{\\"textAlign\\":\\"auto\\"}],\\"placeholderTextColor\\":\\"#9ca2a8\\",\\"keyboardAppearance\\":\\"light\\",\\"autoCorrect\\":false,\\"autoCapitalize\\":\\"none\\",\\"underlineColorAndroid\\":\\"transparent\\",\\"accessibilityLabel\\":\\"Search\\",\\"placeholder\\":\\"Search\\",\\"value\\":\\"\\",\\"blurOnSubmit\\":true,\\"returnKeyType\\":\\"search\\"},\\"children\\":null},{\\"type\\":\\"Text\\",\\"props\\":{\\"selectable\\":false,\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":20,\\"color\\":\\"#2f343d\\"},[{\\"position\\":\\"absolute\\",\\"top\\":14},{\\"right\\":15}],{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]}]}]}]}"`;
exports[`Storyshots SearchBox Basic 1`] = `"{\\"type\\":\\"View\\",\\"props\\":{\\"testID\\":\\"searchbox\\",\\"style\\":{\\"backgroundColor\\":\\"#ffffff\\"}},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":[{\\"marginBottom\\":10},{\\"margin\\":16,\\"marginBottom\\":16}]},\\"children\\":[{\\"type\\":\\"View\\",\\"props\\":{\\"style\\":{\\"position\\":\\"relative\\",\\"justifyContent\\":\\"center\\"}},\\"children\\":[{\\"type\\":\\"TextInput\\",\\"props\\":{\\"style\\":[{\\"color\\":\\"#0d0e12\\"},[{\\"textAlign\\":\\"left\\",\\"backgroundColor\\":\\"transparent\\",\\"fontFamily\\":\\"Inter\\",\\"fontWeight\\":\\"400\\",\\"height\\":48,\\"fontSize\\":16,\\"padding\\":14,\\"borderWidth\\":2,\\"borderRadius\\":2},null,{\\"paddingRight\\":45},{\\"backgroundColor\\":\\"#ffffff\\",\\"borderColor\\":\\"#cbcbcc\\",\\"color\\":\\"#0d0e12\\"},null,null],{\\"textAlign\\":\\"auto\\"}],\\"placeholderTextColor\\":\\"#9ca2a8\\",\\"keyboardAppearance\\":\\"light\\",\\"autoCorrect\\":false,\\"autoCapitalize\\":\\"none\\",\\"underlineColorAndroid\\":\\"transparent\\",\\"accessibilityLabel\\":\\"Search\\",\\"placeholder\\":\\"Search\\",\\"value\\":\\"\\",\\"blurOnSubmit\\":true,\\"returnKeyType\\":\\"search\\"},\\"children\\":null},{\\"type\\":\\"Text\\",\\"props\\":{\\"selectable\\":false,\\"allowFontScaling\\":false,\\"style\\":[{\\"fontSize\\":20,\\"color\\":\\"#2f343d\\"},[{\\"position\\":\\"absolute\\"},{\\"right\\":15}],{\\"fontFamily\\":\\"custom\\",\\"fontWeight\\":\\"normal\\",\\"fontStyle\\":\\"normal\\"},{}]},\\"children\\":[\\"\\"]}]}]}]}"`;

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode VERSIONCODE as Integer
versionName "4.30.0"
versionName "4.31.0"
vectorDrawables.useSupportLibrary = true
if (!isFoss) {
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package chat.rocket.reactnative;

import static com.wix.reactnativenotifications.Defs.NOTIFICATION_RECEIVED_EVENT_NAME;

import android.app.Notification;
import android.app.NotificationChannel;
import android.app.NotificationManager;
Expand Down Expand Up @@ -35,8 +37,6 @@
import java.util.Map;
import java.util.concurrent.ExecutionException;

import static com.wix.reactnativenotifications.Defs.NOTIFICATION_RECEIVED_EVENT_NAME;

public class CustomPushNotification extends PushNotification {
public static ReactApplicationContext reactApplicationContext;
final NotificationManager notificationManager;
Expand Down Expand Up @@ -322,7 +322,12 @@ private void notificationReply(Notification.Builder notification, int notificati
replyIntent.setAction(KEY_REPLY);
replyIntent.putExtra("pushNotification", bundle);

PendingIntent replyPendingIntent = PendingIntent.getBroadcast(mContext, notificationId, replyIntent, PendingIntent.FLAG_UPDATE_CURRENT);
PendingIntent replyPendingIntent;
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
replyPendingIntent = PendingIntent.getBroadcast(mContext, notificationId, replyIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_MUTABLE);
} else {
replyPendingIntent = PendingIntent.getBroadcast(mContext, notificationId, replyIntent, PendingIntent.FLAG_UPDATE_CURRENT);
}

RemoteInput remoteInput = new RemoteInput.Builder(KEY_REPLY)
.setLabel(label)
Expand All @@ -343,7 +348,7 @@ private void notificationDismiss(Notification.Builder notification, int notifica
Intent intent = new Intent(mContext, DismissNotification.class);
intent.putExtra(NOTIFICATION_ID, notificationId);

PendingIntent dismissPendingIntent = PendingIntent.getBroadcast(mContext, notificationId, intent, 0);
PendingIntent dismissPendingIntent = PendingIntent.getBroadcast(mContext, notificationId, intent, PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);

notification.setDeleteIntent(dismissPendingIntent);
}
Expand Down
7 changes: 3 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ buildscript {
buildToolsVersion = "31.0.0"
minSdkVersion = 23
compileSdkVersion = 31
// TODO: Fix "android:exported" issue and target 31 again
targetSdkVersion = 30
targetSdkVersion = 31
if (System.properties['os.arch'] == "aarch64") {
// For M1 Users we need to use the NDK 24 which added support for aarch64
ndkVersion = "24.0.8215888"
Expand All @@ -27,8 +26,8 @@ buildscript {
kotlinVersion = '1.6.10'
supportLibVersion = "28.0.0"
libre_build = !(isPlay.toBoolean())
jitsi_url = isPlay ? "https://github.com/RocketChat/jitsi-maven-repository/raw/master/releases" : "https://github.com/RocketChat/jitsi-maven-repository/raw/libre/releases"
jitsi_version = isPlay ? "3.6.0" : "3.6.0-libre"
jitsi_url = "https://github.com/RocketChat/jitsi-maven-repository/raw/master/releases"
jitsi_version = "3.7.0"
}

repositories {
Expand Down
2 changes: 1 addition & 1 deletion app/containers/List/ListHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { PADDING_HORIZONTAL } from './constants';

const styles = StyleSheet.create({
container: {
paddingBottom: 12,
paddingVertical: 8,
paddingHorizontal: PADDING_HORIZONTAL
},
title: {
Expand Down
2 changes: 1 addition & 1 deletion app/containers/List/ListSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Header } from '.';

const styles = StyleSheet.create({
container: {
marginVertical: 16
marginBottom: 16
}
});

Expand Down
2 changes: 1 addition & 1 deletion app/containers/List/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ import { StyleSheet } from 'react-native';

export const styles = StyleSheet.create({
contentContainerStyleFlatList: {
paddingVertical: 32
paddingVertical: 16
}
});
5 changes: 4 additions & 1 deletion app/containers/SearchBox/index.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React, { useCallback, useState } from 'react';
import { StyleSheet, TextInputProps, View } from 'react-native';

import { useTheme } from '../../theme';
import I18n from '../../i18n';
import { FormTextInput } from '../TextInput';

Expand All @@ -14,13 +15,15 @@ const styles = StyleSheet.create({
const SearchBox = ({ onChangeText, onSubmitEditing, testID }: TextInputProps): JSX.Element => {
const [text, setText] = useState('');

const { colors } = useTheme();

const internalOnChangeText = useCallback(value => {
setText(value);
onChangeText?.(value);
}, []);

return (
<View testID='searchbox'>
<View testID='searchbox' style={{ backgroundColor: colors.backgroundColor }}>
<FormTextInput
autoCapitalize='none'
autoCorrect={false}
Expand Down
10 changes: 5 additions & 5 deletions app/containers/TextInput/FormTextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const styles = StyleSheet.create({
height: 48,
fontSize: 16,
padding: 14,
borderWidth: StyleSheet.hairlineWidth,
borderWidth: 2,
borderRadius: 2
},
inputIconLeft: {
Expand All @@ -37,11 +37,11 @@ const styles = StyleSheet.create({
paddingRight: 45
},
wrap: {
position: 'relative'
position: 'relative',
justifyContent: 'center'
},
iconContainer: {
position: 'absolute',
top: 14
position: 'absolute'
},
iconLeft: {
left: 15
Expand Down Expand Up @@ -98,7 +98,7 @@ export const FormTextInput = ({
style={[
styles.input,
iconLeft && styles.inputIconLeft,
(secureTextEntry || iconRight) && styles.inputIconRight,
(secureTextEntry || iconRight || showClearInput) && styles.inputIconRight,
{
backgroundColor: colors.backgroundColor,
borderColor: colors.separatorColor,
Expand Down
41 changes: 41 additions & 0 deletions app/containers/TextInput/TextInput.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,44 @@ export const ShortAndLong = () => (
</View>
</>
);
export const Icons = () => (
<>
<View style={styles.paddingHorizontal}>
<FormTextInput label='Right icon' placeholder='placeholder' value={item.name} iconRight={'close'} />
<FormTextInput label='Left icon' placeholder='placeholder' value={item.longText} iconLeft={'mail'} />
<FormTextInput label='Both icons' placeholder='placeholder' value={item.longText} iconLeft={'mail'} iconRight={'add'} />
<FormTextInput
label='Icon and touchable clear input'
placeholder='placeholder'
value={item.longText}
onClearInput={() => {}}
/>
</View>
</>
);

export const Multiline = () => (
<>
<View style={styles.paddingHorizontal}>
<FormTextInput label='Multiline text' placeholder='placeholder' multiline value={`${item.name}\n\n${item.longText}\n`} />
</View>
</>
);

export const SecureTextEntry = () => (
<>
<View style={styles.paddingHorizontal}>
<FormTextInput label='Secure text disabled' placeholder='placeholder' value={item.name} />
<FormTextInput label='Secure text enabled' placeholder='placeholder' value={item.name} secureTextEntry />
</View>
</>
);

export const Loading = () => (
<>
<View style={styles.paddingHorizontal}>
<FormTextInput label='Loading false' placeholder='placeholder' value={item.name} loading={false} />
<FormTextInput label='Loading true' placeholder='placeholder' value={item.name} loading />
</View>
</>
);
2 changes: 1 addition & 1 deletion app/containers/UIKit/DatePicker.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const styles = StyleSheet.create({
input: {
height: 48,
paddingLeft: 16,
borderWidth: StyleSheet.hairlineWidth,
borderWidth: 2,
borderRadius: 2,
alignItems: 'center',
flexDirection: 'row'
Expand Down
2 changes: 1 addition & 1 deletion app/containers/UIKit/MultiSelect/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export default StyleSheet.create({
minHeight: 48,
paddingHorizontal: 8,
paddingBottom: 0,
borderWidth: StyleSheet.hairlineWidth,
borderWidth: 2,
borderRadius: 2,
alignItems: 'center',
flexDirection: 'row'
Expand Down
2 changes: 1 addition & 1 deletion app/containers/UIKit/Select.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const styles = StyleSheet.create({
viewContainer: {
marginBottom: 16,
paddingHorizontal: 16,
borderWidth: StyleSheet.hairlineWidth,
borderWidth: 2,
borderRadius: 2,
justifyContent: 'center'
},
Expand Down
14 changes: 11 additions & 3 deletions app/containers/message/Attachments.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const AttachedActions = ({ attachment }: { attachment: IAttachment }) => {
};

const Attachments: React.FC<IMessageAttachments> = React.memo(
({ attachments, timeFormat, showAttachment, style, getCustomEmoji, isReply }: IMessageAttachments) => {
({ attachments, timeFormat, showAttachment, style, getCustomEmoji, isReply, id }: IMessageAttachments) => {
const { theme } = useTheme();

if (!attachments || attachments.length === 0) {
Expand All @@ -80,7 +80,15 @@ const Attachments: React.FC<IMessageAttachments> = React.memo(

if (file && file.audio_url) {
return (
<Audio key={file.audio_url} file={file} getCustomEmoji={getCustomEmoji} isReply={isReply} style={style} theme={theme} />
<Audio
key={file.audio_url}
file={file}
getCustomEmoji={getCustomEmoji}
isReply={isReply}
style={style}
theme={theme}
messageId={id}
/>
);
}

Expand All @@ -106,7 +114,7 @@ const Attachments: React.FC<IMessageAttachments> = React.memo(
);
}

return <Reply key={index} index={index} attachment={file} timeFormat={timeFormat} getCustomEmoji={getCustomEmoji} />;
return <Reply key={index} index={index} attachment={file} timeFormat={timeFormat} getCustomEmoji={getCustomEmoji} messageId={id} />;
});
return <>{attachmentsElements}</>;
},
Expand Down
5 changes: 3 additions & 2 deletions app/containers/message/Audio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ interface IMessageAudioProps {
theme: TSupportedThemes;
getCustomEmoji: TGetCustomEmoji;
scale?: number;
messageId: string;
}

interface IMessageAudioState {
Expand Down Expand Up @@ -128,7 +129,7 @@ class MessageAudio extends React.Component<IMessageAudioProps, IMessageAudioStat
}

async componentDidMount() {
const { file } = this.props;
const { file, messageId } = this.props;
const { baseUrl, user } = this.context;

let url = file.audio_url;
Expand All @@ -139,7 +140,7 @@ class MessageAudio extends React.Component<IMessageAudioProps, IMessageAudioStat
this.setState({ loading: true });
try {
if (url) {
const audio = await downloadAudioFile(`${url}?rc_uid=${user.id}&rc_token=${user.token}`, url);
const audio = await downloadAudioFile(`${url}?rc_uid=${user.id}&rc_token=${user.token}`, url, messageId);
await this.sound.loadAsync({ uri: audio });
}
} catch {
Expand Down
4 changes: 3 additions & 1 deletion app/containers/message/Reply.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ interface IMessageReply {
timeFormat?: string;
index: number;
getCustomEmoji: TGetCustomEmoji;
messageId: string;
}

const Title = React.memo(
Expand Down Expand Up @@ -201,7 +202,7 @@ const Fields = React.memo(
);

const Reply = React.memo(
({ attachment, timeFormat, index, getCustomEmoji }: IMessageReply) => {
({ attachment, timeFormat, index, getCustomEmoji, messageId }: IMessageReply) => {
const [loading, setLoading] = useState(false);
const { theme } = useTheme();
const { baseUrl, user, jumpToMessage } = useContext(MessageContext);
Expand Down Expand Up @@ -256,6 +257,7 @@ const Reply = React.memo(
timeFormat={timeFormat}
style={[{ color: themes[theme].auxiliaryTintColor, fontSize: 14, marginBottom: 8 }]}
isReply
id={messageId}
/>
<UrlImage image={attachment.thumb_url} />
<Description attachment={attachment} getCustomEmoji={getCustomEmoji} theme={theme} />
Expand Down
1 change: 1 addition & 0 deletions app/containers/message/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export interface IMessageAttachments {
isReply?: boolean;
showAttachment?: (file: IAttachment) => void;
getCustomEmoji: TGetCustomEmoji;
id: string;
}

export interface IMessageAvatar {
Expand Down
3 changes: 2 additions & 1 deletion app/definitions/IProfile.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import React from 'react';

export interface IProfileParams {
name: string;
realname?: string;
name?: string;
username: string;
email: string | null;
newPassword: string;
Expand Down
2 changes: 1 addition & 1 deletion app/definitions/IUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export interface INotificationPreferences {
enableMessageParserEarlyAdoption: boolean;
desktopNotifications: TNotifications;
pushNotifications: TNotifications;
emailNotificationMode?: 'mentions' | 'nothing';
emailNotificationMode: 'mentions' | 'nothing';
language?: string;
}

Expand Down
Loading