Skip to content

Commit

Permalink
Chat: Should show correct typing user in React & Angular (T1277962)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruslan Farkhutdinov committed Mar 5, 2025
1 parent 6f493be commit eb0c610
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/demos/Demos/Chat/Overview/Angular/app/app.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ export class AppService {
}

userChatOnTypingStart() {
this.supportChatTypingUsersSubject.next([this.supportAgent]);
this.supportChatTypingUsersSubject.next([this.currentUser]);
}

userChatOnTypingEnd() {
this.supportChatTypingUsersSubject.next([]);
}

supportChatOnTypingStart() {
this.userChatTypingUsersSubject.next([this.currentUser]);
this.userChatTypingUsersSubject.next([this.supportAgent]);
}

supportChatOnTypingEnd() {
Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Chat/Overview/React/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ export default function App() {

function typingStart({ user }: TypingStartEvent) {
if (user.id === currentUser.id) {
setSupportChatTypingUsers([supportAgent]);
setSupportChatTypingUsers([currentUser]);
} else {
setUserChatTypingUsers([currentUser]);
setUserChatTypingUsers([supportAgent]);
}
}

Expand Down
4 changes: 2 additions & 2 deletions apps/demos/Demos/Chat/Overview/ReactJs/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export default function App() {
}
function typingStart({ user }) {
if (user.id === currentUser.id) {
setSupportChatTypingUsers([supportAgent]);
setSupportChatTypingUsers([currentUser]);
} else {
setUserChatTypingUsers([currentUser]);
setUserChatTypingUsers([supportAgent]);
}
}
function typingEnd({ user }) {
Expand Down

0 comments on commit eb0c610

Please sign in to comment.