Skip to content

Commit

Permalink
fix clipping issue on recording message
Browse files Browse the repository at this point in the history
  • Loading branch information
Ovgodd committed Jul 26, 2024
1 parent d6a727a commit 68a02f3
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
19 changes: 6 additions & 13 deletions webapp/channels/src/actions/global_actions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -237,22 +237,15 @@ export function emitLocalUserTypingEvent(type = 'typing', channelId: string, par
const timeBetweenUserTypingUpdatesMilliseconds = Utils.stringToNumber(config.TimeBetweenUserTypingUpdatesMilliseconds);
const maxNotificationsPerChannel = Utils.stringToNumber(config.MaxNotificationsPerChannel);

if (((t - lastTimeTypingSent) > timeBetweenUserTypingUpdatesMilliseconds) &&
(membersInChannel < maxNotificationsPerChannel) && (config.EnableUserTypingMessages === 'true')) {
// infomaniak
switch (type) {
case 'typing':
if (type === 'typing') {
if (((t - lastTimeTypingSent) > timeBetweenUserTypingUpdatesMilliseconds) &&
(membersInChannel < maxNotificationsPerChannel) && (config.EnableUserTypingMessages === 'true')) {
WebSocketClient.userTyping(channelId, userId, parentPostId);
break;
case 'recording':
WebSocketClient.userRecording(channelId, userId, parentPostId);
break;
default:
break;
lastTimeTypingSent = t;
}
lastTimeTypingSent = t;
} else if (type === 'recording') {
WebSocketClient.userRecording(channelId, userId, parentPostId);
}

return {data: true};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ class AdvancedCreateComment extends React.PureComponent<Props, State> {
};

emitRecordingEvent = () => {
const TIMER = 500;
const TIMER = 1000;
this.recordingInterval = setInterval(() => {
const {channelId, rootId} = this.props;
GlobalActions.emitLocalUserTypingEvent('recording', channelId, rootId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,7 @@ class AdvancedCreatePost extends React.PureComponent<Props, State> {
};

emitRecordingEvent = () => {
const TIMER = 500;
const TIMER = 1000;
this.recordingInterval = setInterval(() => {
const channelId = this.props.currentChannel.id;
GlobalActions.emitLocalUserTypingEvent('recording', channelId, '');
Expand Down

0 comments on commit 68a02f3

Please sign in to comment.