Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 7 additions & 2 deletions app/containers/ActionSheet/Item.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,16 @@ export const Item = React.memo(({ item, hide }: IActionSheetItem) => {
style={[styles.item, { backgroundColor: themes[theme].focusedBackground }]}
theme={theme}
testID={item.testID}>
<CustomIcon name={item.icon} size={20} color={item.danger ? themes[theme].dangerColor : themes[theme].bodyText} />
{item.icon ? (
<CustomIcon name={item.icon} size={20} color={item.danger ? themes[theme].dangerColor : themes[theme].bodyText} />
) : null}
<View style={styles.titleContainer}>
<Text
numberOfLines={1}
style={[styles.title, { color: item.danger ? themes[theme].dangerColor : themes[theme].bodyText }]}>
style={[
styles.title,
{ color: item.danger ? themes[theme].dangerColor : themes[theme].bodyText, marginLeft: item.icon ? 16 : 0 }
]}>
{item.title}
</Text>
</View>
Expand Down
2 changes: 1 addition & 1 deletion app/containers/ActionSheet/Provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import ActionSheet from './ActionSheet';

export type TActionSheetOptionsItem = {
title: string;
icon: TIconsName;
icon?: TIconsName;
danger?: boolean;
testID?: string;
onPress: () => void;
Expand Down
1 change: 0 additions & 1 deletion app/containers/ActionSheet/styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ export default StyleSheet.create({
},
title: {
fontSize: 16,
marginLeft: 16,
...sharedStyles.textRegular
},
handle: {
Expand Down
1 change: 1 addition & 0 deletions app/definitions/IRoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,7 @@ export interface IRoomNotifications {
desktopNotifications?: TNotifications;
mobilePushNotifications?: TNotifications;
emailNotifications?: TNotifications;
hideMentionStatus?: boolean;
}

export type TRoomNotificationsModel = IRoomNotifications & Model;
8 changes: 8 additions & 0 deletions app/lib/methods/helpers/info.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ import I18n from '../../../i18n';
export const showErrorAlert = (message: string, title?: string, onPress = () => {}): void =>
Alert.alert(title || '', message, [{ text: 'OK', onPress }], { cancelable: true });

export const showErrorAlertWithEMessage = (e: any): void => {
const messageError =
e.data && e.data.error.includes('[error-too-many-requests]')
? I18n.t('error-too-many-requests', { seconds: e.data.error.replace(/\D/g, '') })
: e.data.errorType;
showErrorAlert(messageError);
};

interface IShowConfirmationAlert {
title?: string;
message: string;
Expand Down
6 changes: 1 addition & 5 deletions app/stacks/InsideStack.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,7 @@ const ChatsStackNavigator = () => {
<ChatsStack.Screen name='MessagesView' component={MessagesView} />
<ChatsStack.Screen name='AutoTranslateView' component={AutoTranslateView} options={AutoTranslateView.navigationOptions} />
<ChatsStack.Screen name='DirectoryView' component={DirectoryView} options={DirectoryView.navigationOptions} />
<ChatsStack.Screen
name='NotificationPrefView'
component={NotificationPrefView}
options={NotificationPrefView.navigationOptions}
/>
<ChatsStack.Screen name='NotificationPrefView' component={NotificationPrefView} />
<ChatsStack.Screen name='ForwardLivechatView' component={ForwardLivechatView} />
<ChatsStack.Screen name='CloseLivechatView' component={CloseLivechatView} />
<ChatsStack.Screen name='LivechatEditView' component={LivechatEditView} options={LivechatEditView.navigationOptions} />
Expand Down
6 changes: 1 addition & 5 deletions app/stacks/MasterDetailStack/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,7 @@ const ModalStackNavigator = React.memo(({ navigation }: INavigation) => {
options={props => DirectoryView.navigationOptions!({ ...props, isMasterDetail: true })}
/>
<ModalStack.Screen name='QueueListView' component={QueueListView} />
<ModalStack.Screen
name='NotificationPrefView'
component={NotificationPrefView}
options={NotificationPrefView.navigationOptions}
/>
<ModalStack.Screen name='NotificationPrefView' component={NotificationPrefView} />
<ModalStack.Screen name='ForwardLivechatView' component={ForwardLivechatView} />
<ModalStack.Screen name='CloseLivechatView' component={CloseLivechatView} />
<ModalStack.Screen name='CannedResponsesListView' component={CannedResponsesListView} />
Expand Down
Loading