Refactor screen share picker internals

This commit is contained in:
Fedor Indutny 2024-09-19 18:03:44 -07:00 committed by GitHub
parent 855b1c03b0
commit d0b8a2991f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
25 changed files with 547 additions and 244 deletions

View file

@ -11,7 +11,7 @@ export type PropsType = {
onCloseController: () => unknown;
onStopSharing: () => unknown;
status: ScreenShareStatus;
presentedSourceName: string;
presentedSourceName: string | undefined;
};
export function CallingScreenSharingController({
@ -25,10 +25,12 @@ export function CallingScreenSharingController({
if (status === ScreenShareStatus.Reconnecting) {
text = i18n('icu:calling__presenting--reconnecting');
} else {
} else if (presentedSourceName) {
text = i18n('icu:calling__presenting--info', {
window: presentedSourceName,
});
} else {
text = i18n('icu:calling__presenting--info--unknown');
}
return (