Only update selected if different from current

This commit is contained in:
Torjus Håkestad 2023-12-04 02:05:04 +01:00
parent 281c3ef4d6
commit 2bc2fb14f6

View File

@ -64,9 +64,11 @@ export class App extends React.Component<AppProps, AppState> {
}
updateSelect(selected: string): void {
this.setState((state) => {
return { streamList: state.streamList, selectedStream: selected }
})
if (selected !== this.state.selectedStream) {
this.setState((state) => {
return { streamList: state.streamList, selectedStream: selected }
})
}
}
render() {