Skip to content

Commit

Permalink
Merge branch 'develop' into fix-separator-render-issue-android
Browse files Browse the repository at this point in the history
  • Loading branch information
OtavioStasiak authored Oct 1, 2024
2 parents cebc1b5 + 7913429 commit c512fed
Show file tree
Hide file tree
Showing 57 changed files with 281 additions and 90 deletions.
2 changes: 1 addition & 1 deletion android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ android {
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode VERSIONCODE as Integer
versionName "4.52.0"
versionName "4.53.0"
vectorDrawables.useSupportLibrary = true
if (!isFoss) {
manifestPlaceholders = [BugsnagAPIKey: BugsnagAPIKey as String]
Expand Down
2 changes: 1 addition & 1 deletion app/containers/Button/Button.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import Button from '.';

const buttonProps = {
title: 'Press me!',
type: 'primary',
type: 'primary' as const,
onPress: () => {},
testID: 'testButton'
};
Expand Down
4 changes: 2 additions & 2 deletions app/containers/Button/Button.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const onPressMock = jest.fn();

const testProps = {
title: 'Press me!',
type: 'primary',
type: 'primary' as const,
onPress: onPressMock,
testID: 'testButton',
initialText: 'Initial text',
Expand All @@ -19,7 +19,7 @@ const TestButton = ({ loading = false, disabled = false }) => (
<View>
<Button
title={testProps.title}
type={testProps.title}
type={testProps.type}
onPress={testProps.onPress}
testID={testProps.testID}
accessibilityLabel={testProps.title}
Expand Down
2 changes: 1 addition & 1 deletion app/containers/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import ActivityIndicator from '../ActivityIndicator';
interface IButtonProps extends PlatformTouchableProps {
title: string;
onPress: () => void;
type?: string; // primary | secondary
type?: 'primary' | 'secondary';
backgroundColor?: string;
loading?: boolean;
color?: string;
Expand Down
2 changes: 1 addition & 1 deletion app/containers/CallHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const CallHeader = ({ mic, cam, setCam, setMic, title, avatar, uid, name,
if (enabled) return { button: colors.buttonBackgroundSecondaryDisabled, icon: colors.strokeExtraDark };
return { button: 'transparent', icon: colors.strokeLight };
}
if (enabled) return { button: colors.strokeHighlight, icon: colors.surfaceLight };
if (enabled) return { button: colors.buttonBackgroundPrimaryDefault, icon: colors.surfaceLight };
return { button: 'transparent', icon: colors.strokeExtraDark };
};

Expand Down
2 changes: 1 addition & 1 deletion app/containers/Check.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const styles = StyleSheet.create({

const Check = React.memo(() => {
const { theme } = useTheme();
return <CustomIcon style={styles.icon} color={themes[theme].badgeBackgroundLevel2} size={22} name='check' />;
return <CustomIcon style={styles.icon} color={themes[theme].fontInfo} size={22} name='check' />;
});

export default Check;
24 changes: 0 additions & 24 deletions app/containers/ImageViewer/ImageComponent.ts

This file was deleted.

9 changes: 3 additions & 6 deletions app/containers/ImageViewer/ImageViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,16 @@ import React, { useState } from 'react';
import { LayoutChangeEvent, StyleSheet, StyleProp, ViewStyle, ImageStyle, View } from 'react-native';
import { Gesture, GestureDetector } from 'react-native-gesture-handler';
import Animated, { withTiming, useSharedValue, useAnimatedStyle, withSpring } from 'react-native-reanimated';
import FastImage from 'react-native-fast-image';

import { useTheme } from '../../theme';
import { ImageComponent } from './ImageComponent';

interface ImageViewerProps {
style?: StyleProp<ImageStyle>;
containerStyle?: StyleProp<ViewStyle>;
imageContainerStyle?: StyleProp<ViewStyle>;

uri: string;
imageComponentType?: string;
width: number;
height: number;
onLoadEnd?: () => void;
Expand All @@ -27,7 +26,7 @@ const styles = StyleSheet.create({
}
});

export const ImageViewer = ({ uri = '', imageComponentType, width, height, ...props }: ImageViewerProps): React.ReactElement => {
export const ImageViewer = ({ uri = '', width, height, ...props }: ImageViewerProps): React.ReactElement => {
const [centerX, setCenterX] = useState(0);
const [centerY, setCenterY] = useState(0);

Expand Down Expand Up @@ -109,15 +108,13 @@ export const ImageViewer = ({ uri = '', imageComponentType, width, height, ...pr

const gesture = Gesture.Simultaneous(pinchGesture, panGesture, doubleTapGesture);

const Component = ImageComponent({ type: imageComponentType, uri });

const { colors } = useTheme();

return (
<View style={[styles.flex, { width, height, backgroundColor: colors.surfaceNeutral }]}>
<GestureDetector gesture={gesture}>
<Animated.View onLayout={onLayout} style={[styles.flex, style]}>
<Component
<FastImage
// @ts-ignore
style={styles.image}
resizeMode='contain'
Expand Down
2 changes: 0 additions & 2 deletions app/containers/ImageViewer/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1 @@
export * from './ImageViewer';
export * from './types';
export * from './ImageComponent';
4 changes: 0 additions & 4 deletions app/containers/ImageViewer/types.ts

This file was deleted.

2 changes: 1 addition & 1 deletion app/containers/List/ListIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { CustomIcon, TIconsName } from '../CustomIcon';
import { ICON_SIZE } from './constants';
import { useTheme } from '../../theme';

interface IListIcon {
export interface IListIcon {
name: TIconsName;
color?: string;
style?: StyleProp<ViewStyle>;
Expand Down
10 changes: 10 additions & 0 deletions app/containers/NewWindowIcon.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import React from 'react';
import { I18nManager } from 'react-native';

import ListIcon, { IListIcon } from './List/ListIcon';

const NewWindowIcon = (props: Omit<IListIcon, 'name'>) => (
<ListIcon name='new-window' style={I18nManager.isRTL ? { transform: [{ rotateY: '180deg' }] } : null} {...props} />
);

export default NewWindowIcon;
13 changes: 3 additions & 10 deletions app/containers/TwoFactor/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,8 @@ const TwoFactor = React.memo(({ isMasterDetail }: { isMasterDetail: boolean }) =
style={[
styles.content,
isMasterDetail && [sharedStyles.modalFormSheet, styles.tablet],
{ backgroundColor: themes[theme].surfaceHover }
]}
>
{ backgroundColor: themes[theme].surfaceTint }
]}>
<Text style={[styles.title, { color }]}>{I18n.t(method?.title || 'Two_Factor_Authentication')}</Text>
{method?.text ? <Text style={[styles.subtitle, { color }]}>{I18n.t(method.text)}</Text> : null}
<FormTextInput
Expand All @@ -133,13 +132,7 @@ const TwoFactor = React.memo(({ isMasterDetail }: { isMasterDetail: boolean }) =
</Text>
) : null}
<View style={styles.buttonContainer}>
<Button
title={I18n.t('Cancel')}
type='secondary'
backgroundColor={themes[theme].surfaceTint}
style={styles.button}
onPress={onCancel}
/>
<Button title={I18n.t('Cancel')} type='secondary' style={styles.button} onPress={onCancel} />
<Button title={I18n.t('Verify')} type='primary' style={styles.button} onPress={onSubmit} testID='two-factor-send' />
</View>
</View>
Expand Down
4 changes: 2 additions & 2 deletions app/containers/markdown/Hashtag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const Hashtag = React.memo(({ hashtag, channels, navToRoomInfo, style = [] }: IH
style={[
styles.mention,
{
color: themes[theme].badgeBackgroundLevel1
color: themes[theme].fontInfo
},
...style
]}
Expand All @@ -63,7 +63,7 @@ const Hashtag = React.memo(({ hashtag, channels, navToRoomInfo, style = [] }: IH
</Text>
);
}
return <Text style={[styles.text, { color: themes[theme].fontDefault }, ...style]}>{`#${hashtag}`}</Text>;
return <Text style={[styles.text, { color: themes[theme].fontInfo }, ...style]}>{`#${hashtag}`}</Text>;
});

export default Hashtag;
5 changes: 5 additions & 0 deletions app/i18n/locales/ar.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"1_person_reacted": "تفاعل شخص واحد",
"A_meaningful_name_for_the_discussion_room": "اسم معبر لغرفة النقاش",
"Accessibility_statement": "بيان الوصول",
"Actions": "الإجراءات",
"Activity": "النشاط",
"Add_Server": "إضافة خادم",
Expand Down Expand Up @@ -163,6 +164,9 @@
"Forward_to_user": "إعادة توجيه لمستخدم",
"Full_table": "انقر لرؤية الجدول كاملاً",
"Generate_New_Link": "إنشاء رابط جديد",
"Get_help": "احصل على المساعدة",
"Glossary_of_simplified_terms": "مسرد المصطلحات المبسطة",
"Help": "مساعدة",
"Hide_room": "إخفاء",
"Hide_System_Messages": "إخفاء رسائل النظام",
"Hide_type_messages": "إخفاء رسائل \"{{type}}\"",
Expand Down Expand Up @@ -352,6 +356,7 @@
"Review_app_unable_store": "لم يتمكن من فتح {{store}}",
"Review_app_yes": "أكيد!",
"Review_this_app": "تقييم هذا التطبيق",
"Rocket_Chat_Documentation": "توثيق Rocket.Chat",
"Roles": "أدوار",
"Room_Info": "معلومات الغرفة",
"Room_Info_Edit": "تعديل معلومات الغرفة",
Expand Down
5 changes: 5 additions & 0 deletions app/i18n/locales/bn-IN.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"A_new_owner_will_be_assigned_automatically_to__count__room": "{{count}} রুমে নতুন মালিক স্বয়ংক্রিয়ভাবে নির্ধারণ করা হবে।",
"A_new_owner_will_be_assigned_automatically_to__count__rooms": "{{count}} রুমে নতুন মালিক স্বয়ংক্রিয়ভাবে নির্ধারণ করা হবে।",
"accept": "গ্রহণ করুন",
"Accessibility_statement": "অ্যাক্সেসিবিলিটি বিবৃতি",
"Accounts_Default_User_Preferences_alsoSendThreadToChannel_Description": "ব্যবহারকারীদের 'সেইমসঙ্গে চ্যানেলে প্রেরণ করুন' আচরণ নির্ধারণ করার অনুমতি দিন",
"Actions": "ক্রিয়াবলী",
"Activity": "ক্রিয়া",
Expand Down Expand Up @@ -275,9 +276,12 @@
"Forward_to_user": "ব্যবহারকারীকে ফরোয়ার্ড",
"Full_table": "পুরো টেবিল দেখতে ক্লিক করুন",
"Generate_New_Link": "নতুন লিঙ্ক তৈরি করুন",
"Get_help": "সাহায্য পান",
"Get_link": "লিঙ্ক পান",
"Glossary_of_simplified_terms": "সরলীকৃত শর্তগুলির গ্লোসারি",
"Group_by": "দ্বারা গ্রুপ করুন",
"Has_left_the_team": "দল ছেড়ে দিয়েছে",
"Help": "সাহায্য",
"Hide_System_Messages": "সিস্টেম বার্তা লুকান",
"Hide_type_messages": "\"{{type}}\" বার্তা লুকান",
"How_It_Works": "এটি কীভাবে কাজ করে",
Expand Down Expand Up @@ -542,6 +546,7 @@
"Review_app_unable_store": "{{store}} খোলতে অক্ষম",
"Review_app_yes": "হ্যাঁ!",
"Review_this_app": "এই অ্যাপটি পর্যালোচনা করুন",
"Rocket_Chat_Documentation": "Rocket.Chat ডকুমেন্টেশন",
"Roles": "ভূমিকা",
"room_allowed_reactions": "রিয়েকশন অনুমতি দেওয়া হয়েছে",
"room_archived": "আর্কাইভ করা রুম",
Expand Down
5 changes: 5 additions & 0 deletions app/i18n/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"A_new_owner_will_be_assigned_automatically_to__count__room": "K {{count}} místnosti bude automaticky přiřazen nový vlastník.",
"A_new_owner_will_be_assigned_automatically_to__count__rooms": "K {{count}} místnostem bude automaticky přiřazen nový vlastník.",
"accept": "Akceptovat",
"Accessibility_statement": "Prohlášení o přístupnosti",
"Accounts_Default_User_Preferences_alsoSendThreadToChannel_Description": "Povolit uživatelům vybrat chování 'Také odeslat do kanálu'",
"Actions": "Akce",
"Activity": "Aktivita",
Expand Down Expand Up @@ -294,10 +295,13 @@
"Forward_to_user": "Přeposlat uživateli",
"Full_table": "Kliknutím zobrazíte celou tabulku",
"Generate_New_Link": "Vygenerovat nový odkaz",
"Get_help": "Získat pomoc",
"Get_link": "Získat odkaz",
"Glossary_of_simplified_terms": "Slovník zjednodušených termínů",
"Go_to_your_device_settings_and_allow_microphone": "Přejděte do nastavení zařízení a povolte přístup k mikrofonu pro Rocket.Chat",
"Group_by": "Skupina vytvořená",
"Has_left_the_team": "opustil tým",
"Help": "Pomoc",
"Hide_room": "Skrýt",
"Hide_System_Messages": "Skrýt systémové zprávy",
"Hide_type_messages": "Skrýt \"{{type}}\" zprávy",
Expand Down Expand Up @@ -592,6 +596,7 @@
"Review_app_unable_store": "Nelze otevřít {{store}}",
"Review_app_yes": "Tak určitě!",
"Review_this_app": "Zkontrolovat tuto aplikaci",
"Rocket_Chat_Documentation": "Dokumentace Rocket.Chat",
"Roles": "Role",
"room_allowed_reactions": "povolené reakce",
"room_archived": "archivovaná místnost",
Expand Down
5 changes: 5 additions & 0 deletions app/i18n/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"A_new_owner_will_be_assigned_automatically_to__count__room": "Ein neuer Besitzer wird automatisch zu {{count}} Raum zugeordnet.",
"A_new_owner_will_be_assigned_automatically_to__count__rooms": "Ein neuer Besitzer wird automatisch zu {{count}} Räumen zugeordnet.",
"accept": "Annehmen",
"Accessibility_statement": "Barrierefreiheits-Erklärung",
"Accounts_Default_User_Preferences_alsoSendThreadToChannel_Description": "Nutzern erlauben das Verhalten für \"auch an den Kanal senden\" zu bestimmen.",
"Actions": "Aktionen",
"Activity": "Aktivität",
Expand Down Expand Up @@ -268,9 +269,12 @@
"Forward_to_user": "Weiterleiten an Benutzer",
"Full_table": "Klicken, um die ganze Tabelle anzuzeigen",
"Generate_New_Link": "Neuen Link erstellen",
"Get_help": "Hilfe holen",
"Get_link": "Link erhalten",
"Glossary_of_simplified_terms": "Glossar vereinfachter Begriffe",
"Group_by": "Gruppieren nach",
"Has_left_the_team": "Hat das Team verlassen",
"Help": "Hilfe",
"Hide_room": "Raum verstecken",
"Hide_System_Messages": "Systemnachrichten ausblenden",
"Hide_type_messages": "\"{{type}}\"-Nachrichten ausblenden",
Expand Down Expand Up @@ -530,6 +534,7 @@
"Review_app_unable_store": "Kann {{store}} nicht öffnen",
"Review_app_yes": "Sicher!",
"Review_this_app": "App bewerten",
"Rocket_Chat_Documentation": "Rocket.Chat Dokumentation",
"Roles": "Rollen",
"room_allowed_reactions": "hat Reaktionen erlaubt",
"room_archived": "hat den Raum archiviert",
Expand Down
5 changes: 5 additions & 0 deletions app/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"A_new_owner_will_be_assigned_automatically_to__count__room": "A new owner will be assigned automatically to {{count}} room.",
"A_new_owner_will_be_assigned_automatically_to__count__rooms": "A new owner will be assigned automatically to {{count}} rooms.",
"accept": "Accept",
"Accessibility_statement": "Accessibility statement",
"Accounts_Default_User_Preferences_alsoSendThreadToChannel_Description": "Allow users to select the 'Also send to channel' behavior",
"Actions": "Actions",
"Activity": "Activity",
Expand Down Expand Up @@ -310,10 +311,13 @@
"Forward_to_user": "Forward to user",
"Full_table": "Click to see full table",
"Generate_New_Link": "Generate new link",
"Get_help": "Get help",
"Get_link": "Get link",
"Glossary_of_simplified_terms": "Glossary of simplified terms",
"Go_to_your_device_settings_and_allow_microphone": "Go to your device settings and allow microphone access for Rocket.Chat",
"Group_by": "Group by",
"Has_left_the_team": "has left the team",
"Help": "Help",
"Hide_room": "Hide",
"Hide_System_Messages": "Hide system messages",
"Hide_type_messages": "Hide \"{{type}}\" messages",
Expand Down Expand Up @@ -611,6 +615,7 @@
"Review_app_unable_store": "Unable to open {{store}}",
"Review_app_yes": "Sure!",
"Review_this_app": "Review this app",
"Rocket_Chat_Documentation": "Rocket.Chat documentation",
"Roles": "Roles",
"room_allowed_reactions": "allowed reactions",
"room_archived": "archived room",
Expand Down
5 changes: 5 additions & 0 deletions app/i18n/locales/es.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"1_person_reacted": "1 persona reaccionó",
"Accessibility_statement": "Declaración de accesibilidad",
"Actions": "Acciones",
"Activity": "Actividad",
"Add_Server": "Añadir servidor",
Expand Down Expand Up @@ -108,7 +109,10 @@
"Forgot_password": "¿Ha olvidado su contraseña?",
"Forgot_password_If_this_email_is_registered": "Si este email está registrado, te enviaremos las instrucciones para resetear tu contraseña. Si no recibes un email en breve, vuelve aquí e inténtalo de nuevo.",
"Full_table": "Click para ver la tabla completa",
"Get_help": "Obtener ayuda",
"Get_link": "Obtener enlace",
"Glossary_of_simplified_terms": "Glosario de términos simplificados",
"Help": "Ayuda",
"Hide_room": "Ocultar",
"In_App_And_Desktop": "En la aplicación y en el escritorio",
"In_App_and_Desktop_Alert_info": "Muestra un banner en la parte superior de la pantalla cuando la aplicación esté abierta y muestra una notificación en el escritorio",
Expand Down Expand Up @@ -203,6 +207,7 @@
"RESET": "RESET",
"Reset_password": "Resetear contraseña",
"resetting_password": "reseteando contraseña",
"Rocket_Chat_Documentation": "Documentación de Rocket.Chat",
"Roles": "Roles",
"Room_Info": "Información de la sala",
"Room_Info_Edit": "Editar información de la sala",
Expand Down
Loading

0 comments on commit c512fed

Please sign in to comment.