mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-11 18:35:49 +01:00
Require initialized state for some more actions
This commit is contained in:
parent
66ed672ad6
commit
6d7428ad29
@ -193,12 +193,10 @@ public class ControlCenter extends Activity {
|
||||
getMenuInflater().inflate(R.menu.controlcenter_context, menu);
|
||||
|
||||
DeviceCoordinator coordinator = DeviceHelper.getInstance().getCoordinator(selectedDevice);
|
||||
if (!selectedDevice.isConnected() || !coordinator.supportsActivityDataFetching()) {
|
||||
if (!coordinator.supportsActivityDataFetching()) {
|
||||
menu.removeItem(R.id.controlcenter_fetch_activity_data);
|
||||
menu.removeItem(R.id.controlcenter_configure_alarms);
|
||||
}
|
||||
|
||||
if (!selectedDevice.isConnected() || !coordinator.supportsScreenshots()) {
|
||||
if (!coordinator.supportsScreenshots()) {
|
||||
menu.removeItem(R.id.controlcenter_take_screenshot);
|
||||
}
|
||||
|
||||
@ -207,6 +205,9 @@ public class ControlCenter extends Activity {
|
||||
}
|
||||
if (!selectedDevice.isInitialized()) {
|
||||
menu.removeItem(R.id.controlcenter_find_device);
|
||||
menu.removeItem(R.id.controlcenter_fetch_activity_data);
|
||||
menu.removeItem(R.id.controlcenter_configure_alarms);
|
||||
menu.removeItem(R.id.controlcenter_take_screenshot);
|
||||
}
|
||||
|
||||
menu.setHeaderTitle(selectedDevice.getName());
|
||||
|
Loading…
Reference in New Issue
Block a user