Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#1228 issue: upated Profileview/index.tsx #6061

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion app/actions/actionsTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const FAILURE = 'FAILURE';
const defaultTypes = [REQUEST, SUCCESS, FAILURE];
function createRequestTypes(base = {}, types = defaultTypes): Record<string, string> {
const res: Record<string, string> = {};
types.forEach(type => (res[type] = `${base}_${type}`));
types.forEach(type => res[type] = `${base}_${type}`);
return res;
}

Expand Down
14 changes: 7 additions & 7 deletions app/actions/login.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ interface ISetLocalAuthenticated extends Action {
}

export type TActionsLogin = ILoginRequest &
ILoginSuccess &
ILoginFailure &
ILogout &
ISetUser &
ISetServices &
ISetPreference &
ISetLocalAuthenticated;
ILoginSuccess &
ILoginFailure &
ILogout &
ISetUser &
ISetServices &
ISetPreference &
ISetLocalAuthenticated;

export function loginRequest(
credentials: Partial<ICredentials>,
Expand Down
14 changes: 7 additions & 7 deletions app/actions/room.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ export interface IRoomHistoryFinished extends Action {
}

export type TActionsRoom = TSubscribeRoom &
TUnsubscribeRoom &
ILeaveRoom &
IDeleteRoom &
IForwardRoom &
IUserTyping &
IRoomHistoryRequest &
IRoomHistoryFinished;
TUnsubscribeRoom &
ILeaveRoom &
IDeleteRoom &
IForwardRoom &
IUserTyping &
IRoomHistoryRequest &
IRoomHistoryFinished;

export function subscribeRoom(rid: string): TSubscribeRoom {
return {
Expand Down
12 changes: 6 additions & 6 deletions app/actions/videoConf.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ export interface IVideoConfGenericAction extends Action {
}

export type TActionVideoConf = IHandleVideoConfIncomingWebsocketMessages &
IVideoConfGenericAction &
TSetCallingAction &
Action &
TInitCallAction &
TCancelCallAction &
TAcceptCallAction;
IVideoConfGenericAction &
TSetCallingAction &
Action &
TInitCallAction &
TCancelCallAction &
TAcceptCallAction;

export function handleVideoConfIncomingWebsocketMessages(data: any): IHandleVideoConfIncomingWebsocketMessages {
return {
Expand Down
2 changes: 1 addition & 1 deletion app/containers/List/ListItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const styles = StyleSheet.create({
...sharedStyles.textRegular
},
actionIndicator: {
...(I18nManager.isRTL ? { transform: [{ rotate: '180deg' }] } : {})
...I18nManager.isRTL ? { transform: [{ rotate: '180deg' }] } : {}
}
});

Expand Down
2 changes: 1 addition & 1 deletion app/containers/MessageActions/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ const MessageActions = React.memo(
const subRecord = await subCollection.find(rid);
await db.write(async () => {
try {
await subRecord.update(sub => (sub.lastOpen = ts as Date)); // TODO: reevaluate IMessage
await subRecord.update(sub => sub.lastOpen = ts as Date); // TODO: reevaluate IMessage
} catch {
// do nothing
}
Expand Down
2 changes: 1 addition & 1 deletion app/containers/MessageComposer/MessageComposer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ export const MessageComposer = ({
return (
<MessageInnerContext.Provider value={{ sendMessage: handleSendMessage, onEmojiSelected, closeEmojiKeyboardAndAction }}>
<KeyboardAccessoryView
ref={(ref: ITrackingView) => (trackingViewRef.current = ref)}
ref={(ref: ITrackingView) => trackingViewRef.current = ref}
renderContent={renderContent}
kbInputRef={composerInputRef}
kbComponent={showEmojiKeyboard ? 'EmojiKeyboard' : null}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ export const ComposerInput = memo(
style={[styles.textInput, { color: colors.fontDefault }]}
placeholder={placeholder}
placeholderTextColor={colors.fontAnnotation}
ref={component => (inputRef.current = component)}
ref={component => inputRef.current = component}
blurOnSubmit={false}
onChangeText={onChangeText}
onSelectionChange={onSelectionChange}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ describe('getMentionRegexpUser', function () {
});

test('removing query text on user suggestion autocomplete (special characters in query)', () => {
const message = "Hey @'=test123";
const message = 'Hey @\'=test123';
expect(message.replace(regexp, '')).toBe('Hey @');
});
});
Expand Down
10 changes: 5 additions & 5 deletions app/containers/RoomItem/UpdatedAt.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ const UpdatedAt = React.memo(({ date, hideUnreadStatus, alert }: IUpdatedAtProps
},
alert &&
!hideUnreadStatus && [
styles.updateAlert,
{
color: colors.badgeBackgroundLevel2
}
]
styles.updateAlert,
{
color: colors.badgeBackgroundLevel2
}
]
]}
ellipsizeMode='tail'
numberOfLines={1}>
Expand Down
2 changes: 1 addition & 1 deletion app/containers/TextInput/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { useTheme } from '../../theme';

const styles = StyleSheet.create({
input: {
...(I18nManager.isRTL ? { textAlign: 'right' } : { textAlign: 'auto' })
...I18nManager.isRTL ? { textAlign: 'right' } : { textAlign: 'auto' }
}
});

Expand Down
2 changes: 1 addition & 1 deletion app/containers/Toast.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const Toast = (): React.ReactElement => {
};
}, []);

const getToastRef = (newToast: EasyToast | null) => (toast = newToast);
const getToastRef = (newToast: EasyToast | null) => toast = newToast;

const showToast = ({ message }: { message: string }) => {
if (toast && toast.show) {
Expand Down
2 changes: 1 addition & 1 deletion app/containers/UIKit/Overflow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const Overflow = ({ element, loading, action, parser }: IOverflow) => {
return (
<>
<Touchable
ref={ref => (touchable[blockId] = ref)}
ref={ref => touchable[blockId] = ref}
background={Touchable.Ripple(themes[theme].surfaceNeutral)}
onPress={() => onShow(!show)}
hitSlop={BUTTON_HIT_SLOP}
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 @@ -50,7 +50,7 @@ export const Select = ({ options = [], placeholder, onChange, loading, disabled,
const items = options.map(option => ({ label: textParser([option.text]), value: option.value }));
const pickerStyle = {
...styles.viewContainer,
...(isIOS ? styles.iosPadding : {}),
...isIOS ? styles.iosPadding : {},
borderColor: themes[theme].strokeLight,
backgroundColor: themes[theme].surfaceRoom
};
Expand Down
2 changes: 1 addition & 1 deletion app/containers/UnreadBadge/getUnreadStyle.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { themes } from '../../lib/constants';
import { getUnreadStyle } from './getUnreadStyle';

const testsForTheme = theme => {
const testsForTheme = (theme) => {
const getUnreadStyleUtil = ({ ...props }) => getUnreadStyle({ theme, ...props });

test('render empty', () => {
Expand Down
2 changes: 1 addition & 1 deletion app/containers/markdown/Hashtag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const Hashtag = React.memo(({ hashtag, channels, navToRoomInfo, style = [] }: IH
t: 'c',
rid: channels?.[index]._id
};
const room = navParam.rid && (await getSubscriptionByRoomId(navParam.rid));
const room = navParam.rid && await getSubscriptionByRoomId(navParam.rid);
if (room) {
goRoom({ item: room, isMasterDetail });
} else if (navParam.rid) {
Expand Down
2 changes: 1 addition & 1 deletion app/containers/markdown/mergeTextNodes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function mergeTextNodes(ast: any) {
const walker = ast.walker();
let event;
// eslint-disable-next-line no-cond-assign
while ((event = walker.next())) {
while (event = walker.next()) {
const { entering, node } = event;
const { type } = node;
if (entering && type === 'text') {
Expand Down
4 changes: 2 additions & 2 deletions app/containers/message/Components/Attachments/Image/Image.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ export const MessageImage = React.memo(({ uri, status, encrypted = false }: IMes
const containerStyle: ViewStyle = {
alignItems: 'center',
justifyContent: 'center',
...(imageDimensions.width <= 64 && { width: 64 }),
...(imageDimensions.height <= 64 && { height: 64 })
...imageDimensions.width <= 64 && { width: 64 },
...imageDimensions.height <= 64 && { height: 64 }
};

const borderStyle: ViewStyle = {
Expand Down
2 changes: 1 addition & 1 deletion app/containers/message/Components/Attachments/Video.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import BlurComponent from '../OverlayComponent';
import { TDownloadState } from '../../../../lib/methods/handleMediaDownload';
import messageStyles from '../../styles';

const SUPPORTED_TYPES = ['video/quicktime', 'video/mp4', ...(isIOS ? [] : ['video/3gp', 'video/mkv'])];
const SUPPORTED_TYPES = ['video/quicktime', 'video/mp4', ...isIOS ? [] : ['video/3gp', 'video/mkv']];
const isTypeSupported = (type: string) => SUPPORTED_TYPES.indexOf(type) !== -1;

const styles = StyleSheet.create({
Expand Down
4 changes: 2 additions & 2 deletions app/containers/message/Urls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ const UrlImage = ({ image, hasContent }: { image: string; hasContent: boolean })
overflow: 'hidden',
alignItems: 'center',
justifyContent: 'center',
...(imageDimensions.width <= 64 && { width: 64 }),
...(imageDimensions.height <= 64 && { height: 64 })
...imageDimensions.width <= 64 && { width: 64 },
...imageDimensions.height <= 64 && { height: 64 }
};
if (!hasContent) {
containerStyle = {
Expand Down
10 changes: 5 additions & 5 deletions app/containers/message/interfaces.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,11 +102,11 @@ export interface IMessageRepliedThread extends Pick<IThread, 'tmid' | 'tmsg' | '

export interface IMessageInner
extends IMessageContent,
IMessageCallButton,
IMessageBlocks,
IMessageThread,
IMessageAttachments,
IMessageBroadcast {
IMessageCallButton,
IMessageBlocks,
IMessageThread,
IMessageAttachments,
IMessageBroadcast {
type: MessageType;
blocks: [];
urls?: IUrl[];
Expand Down
2 changes: 1 addition & 1 deletion app/definitions/IDataSelect.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { TSubscriptionModel } from './ISubscription';

export type TDataSelect = Pick<TSubscriptionModel, 'rid'> &
Partial<Pick<TSubscriptionModel, 't' | 'name' | 'teamMain' | 'alert'>>;
Partial<Pick<TSubscriptionModel, 't' | 'name' | 'teamMain' | 'alert'>>;
6 changes: 3 additions & 3 deletions app/definitions/IMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,9 @@ export interface IMessage extends IMessageFromServer {
}

export type TMessageModel = IMessage &
Model & {
asPlain: () => IMessage;
};
Model & {
asPlain: () => IMessage;
};

export type TAnyMessageModel = TMessageModel | TThreadModel | TThreadMessageModel;
export type TTypeMessages = IMessageFromServer | ILoadMoreMessage | IMessage;
Expand Down
8 changes: 4 additions & 4 deletions app/definitions/IRocketChatRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export interface IRocketChatRecord {
}

export type RocketChatRecordDeleted<T> = T &
IRocketChatRecord & {
_deletedAt: Date;
__collection__: string;
};
IRocketChatRecord & {
_deletedAt: Date;
__collection__: string;
};
34 changes: 17 additions & 17 deletions app/definitions/ISetting.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,23 @@ export type ISetting = ISettingBase | ISettingEnterprise | ISettingColor | ISett
export interface ISettingBase {
_id: SettingId;
type:
| 'boolean'
| 'timezone'
| 'string'
| 'relativeUrl'
| 'password'
| 'int'
| 'select'
| 'multiSelect'
| 'language'
| 'color'
| 'font'
| 'code'
| 'action'
| 'asset'
| 'roomPick'
| 'group'
| 'date';
| 'boolean'
| 'timezone'
| 'string'
| 'relativeUrl'
| 'password'
| 'int'
| 'select'
| 'multiSelect'
| 'language'
| 'color'
| 'font'
| 'code'
| 'action'
| 'asset'
| 'roomPick'
| 'group'
| 'date';
public: boolean;
env: boolean;
group?: GroupId;
Expand Down
6 changes: 3 additions & 3 deletions app/definitions/ISubscription.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,9 @@ export interface ISubscription {
}

export type TSubscriptionModel = ISubscription &
Model & {
asPlain: () => ISubscription;
};
Model & {
asPlain: () => ISubscription;
};
export type TSubscription = TSubscriptionModel | ISubscription;

// https://github.com/RocketChat/Rocket.Chat/blob/a88a96fcadd925b678ff27ada37075e029f78b5e/definition/ISubscription.ts#L8
Expand Down
4 changes: 2 additions & 2 deletions app/definitions/ITeam.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ export interface ITeamStats {

export interface IServerTeamUpdateRoom
extends Omit<
IServerRoom,
'topic' | 'joinCodeRequired' | 'description' | 'jitsiTimeout' | 'usersCount' | 'e2eKeyId' | 'avatarETag'
IServerRoom,
'topic' | 'joinCodeRequired' | 'description' | 'jitsiTimeout' | 'usersCount' | 'e2eKeyId' | 'avatarETag'
> {
teamId: string;
teamDefault: boolean;
Expand Down
6 changes: 3 additions & 3 deletions app/definitions/IThread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ export interface IThread extends IMessage {
}

export type TThreadModel = IThread &
Model & {
asPlain: () => IMessage;
};
Model & {
asPlain: () => IMessage;
};
6 changes: 3 additions & 3 deletions app/definitions/IThreadMessage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ export interface IThreadMessage extends IMessage {
}

export type TThreadMessageModel = IThreadMessage &
Model & {
asPlain: () => IMessage;
};
Model & {
asPlain: () => IMessage;
};
10 changes: 5 additions & 5 deletions app/definitions/IUpload.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ export interface IUpload {
}

export type TUploadModel = IUpload &
Model & {
asPlain: () => IUpload;
};
Model & {
asPlain: () => IUpload;
};

export type TSendFileMessageFileInfo = Pick<
IUpload,
'rid' | 'path' | 'name' | 'tmid' | 'description' | 'size' | 'type' | 'msg' | 'width' | 'height'
IUpload,
'rid' | 'path' | 'name' | 'tmid' | 'description' | 'size' | 'type' | 'msg' | 'width' | 'height'
>;
Loading