Skip to content

Commit

Permalink
more clear info
Browse files Browse the repository at this point in the history
  • Loading branch information
jibon57 committed Sep 6, 2024
1 parent f8b1306 commit 10f4d2a
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/assets/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@
"nats-error-auth-body": "We was not able to verify your auth information. May be you are using an expired token?",
"user-logged-out": "You logged out",
"media-server-disconnected-reconnecting": "Media server disconnected, reconnecting...",
"media-server-disconnected": "Media server disconnected."
"media-server-disconnected": "Media server disconnected.",
"preloaded-whiteboard-file-processing": "Preloaded whiteboard file in progress",
"preloaded-whiteboard-file-processing-error": "Preloaded whiteboard file processing ended with error"
},
"room-metadata": {
"session-recording": "This session is being recording",
Expand Down
20 changes: 20 additions & 0 deletions src/helpers/nats/HandleRoomData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export default class HandleRoomData {
private _room: ICurrentRoom;
private welcomeMessage: string | undefined = undefined;
private checkedPreloadedWhiteboardFile = false;
private toastId: any = undefined;

constructor() {
this._room = {
Expand Down Expand Up @@ -154,13 +155,27 @@ export default class HandleRoomData {
const whiteboard = this._room.metadata?.roomFeatures?.whiteboardFeatures;
if (!whiteboard?.preloadFile || whiteboard.preloadFile === '') {
// we don't have a preload file
// or may be processing was not successful
this.checkedPreloadedWhiteboardFile = true;
if (this.toastId) {
toast.dismiss(this.toastId);
this.toastId = undefined;
}
return;
}

if (!whiteboard.fileName || whiteboard.fileName === '') {
// we have preload file, but that wasn't ready
// we'll wait until the new update arrives
if (!this.toastId) {
this.toastId = toast.loading(
i18n.t('notifications.preloaded-whiteboard-file-processing'),
{
type: 'info',
closeButton: true,
},
);
}
return;
}

Expand Down Expand Up @@ -193,5 +208,10 @@ export default class HandleRoomData {
handleToAddWhiteboardUploadedOfficeNewFile(f);
}
this.checkedPreloadedWhiteboardFile = true;

if (this.toastId) {
toast.dismiss(this.toastId);
this.toastId = undefined;
}
};
}

0 comments on commit 10f4d2a

Please sign in to comment.