Type cleanup

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2020-12-26 18:10:50 +01:00
parent 322afe6450
commit 5779a543c9
No known key found for this signature in database
GPG key ID: 9760693FDD98A790
3 changed files with 18 additions and 22 deletions

View file

@ -24,19 +24,13 @@ export enum Tabs {
Screens = "screens",
Windows = "windows",
}
export interface ElectronDesktopCapturerSource {
display_id: string;
id: string;
name: string;
thumbnail,
appIcon,
}
export interface DesktopCapturerSourceIProps {
source: ElectronDesktopCapturerSource,
onSelect(source: ElectronDesktopCapturerSource): void,
source: DesktopCapturerSource,
onSelect(source: DesktopCapturerSource): void,
}
export class DesktopCapturerSource extends React.Component<DesktopCapturerSourceIProps> {
export class ExistingSource extends React.Component<DesktopCapturerSourceIProps> {
constructor(props) {
super(props);
}
@ -63,13 +57,12 @@ export class DesktopCapturerSource extends React.Component<DesktopCapturerSource
}
}
export interface DesktopCapturerSourcePickerIState {
selectedTab: Tabs;
}
export interface DesktopCapturerSourcePickerIProps {
sources: Array<ElectronDesktopCapturerSource>;
onFinished(source: ElectronDesktopCapturerSource): void,
sources: Array<DesktopCapturerSource>;
onFinished(source: DesktopCapturerSource): void,
}
// TODO: Figure out a way to update sources for live preview
@ -110,7 +103,7 @@ export default class DesktopCapturerSourcePicker extends React.Component<
return source.id.startsWith("screen");
})
.map((source) => {
return <DesktopCapturerSource source={source} onSelect={this.onSelect} key={source.id} />;
return <ExistingSource source={source} onSelect={this.onSelect} key={source.id} />;
});
} else {
sources = this.props.sources
@ -118,7 +111,7 @@ export default class DesktopCapturerSourcePicker extends React.Component<
return source.id.startsWith("window");
})
.map((source) => {
return <DesktopCapturerSource source={source} onSelect={this.onSelect} key={source.id} />;
return <ExistingSource source={source} onSelect={this.onSelect} key={source.id} />;
});
}
const buttonStyle = "mx_streamSelectorDialog_tabLabel";