Screen orientation, Keep Display on (in Android Client)

This commit is contained in:
Robin E. R. Davies
2025-07-19 00:06:17 -04:00
parent 818a08824c
commit 9b6798134d
15 changed files with 559 additions and 51 deletions
+18 -4
View File
@@ -79,6 +79,7 @@ interface PerformanceViewState {
presets: PresetIndex;
banks: BankIndex;
showSnapshotEditor: boolean;
showStatusMonitor: boolean;
snapshotEditorIndex: number;
presetModified: boolean;
}
@@ -100,15 +101,24 @@ export const PerformanceView =
banks: this.model.banks.get(),
wrapSelects: false,
showSnapshotEditor: false,
showStatusMonitor: this.model.showStatusMonitor.get(),
snapshotEditorIndex: 0,
presetModified: this.model.presetChanged.get()
};
this.onPresetsChanged = this.onPresetsChanged.bind(this);
this.onBanksChanged = this.onBanksChanged.bind(this);
this.onPresetChangedChanged = this.onPresetChangedChanged.bind(this);
this.showStatusMonitorHandler = this.showStatusMonitorHandler.bind(this);
}
showStatusMonitorHandler() {
this.setState({
showStatusMonitor: this.model.showStatusMonitor.get()
});
}
getTag() { return "performView"}
isOpen() { return this.props.open }
onDialogStackClose() {
@@ -156,6 +166,8 @@ export const PerformanceView =
this.model.presets.addOnChangedHandler(this.onPresetsChanged);
this.model.banks.addOnChangedHandler(this.onBanksChanged);
this.model.presetChanged.addOnChangedHandler(this.onPresetChangedChanged)
this.model.showStatusMonitor.addOnChangedHandler(this.showStatusMonitorHandler);
this.setState({
presets: this.model.presets.get(),
banks: this.model.banks.get(),
@@ -173,6 +185,8 @@ export const PerformanceView =
this.model.presetChanged.removeOnChangedHandler(this.onPresetChangedChanged)
this.model.presets.removeOnChangedHandler(this.onPresetsChanged);
this.model.banks.removeOnChangedHandler(this.onBanksChanged);
this.model.banks.removeOnChangedHandler(this.showStatusMonitorHandler);
this.mounted = false;
this.updateHooks();
@@ -393,10 +407,10 @@ export const PerformanceView =
<SnapshotPanel onEdit={(index) => { return this.handleOnEdit(index); }} />
</div>
{!this.state.showSnapshotEditor && (
<JackStatusView />)
}
{!this.state.showSnapshotEditor && this.state.showStatusMonitor && (
<JackStatusView />
)}
</div>
{this.state.showSnapshotEditor && (
<SnapshotEditor snapshotIndex={this.state.snapshotEditorIndex}