1
0
mirror of https://codeberg.org/Freeyourgadget/Gadgetbridge synced 2024-11-04 09:17:29 +01:00

Fossil Hybrid HR: Fix widget configuration bug

This commit is contained in:
Arjan Schrijver 2021-11-29 22:08:48 +01:00 committed by Gitea
parent 468a40c62e
commit 7d552ce41f

View File

@ -680,13 +680,15 @@ public class HybridHRWatchfaceDesignerActivity extends AbstractGBActivity implem
if (selectedPosY > 240) selectedPosY = 240; if (selectedPosY > 240) selectedPosY = 240;
String selectedType = widgetTypesArray.get(typeSpinner.getSelectedItemPosition()); String selectedType = widgetTypesArray.get(typeSpinner.getSelectedItemPosition());
String selectedTZ = tzSpinner.getSelectedItem().toString(); String selectedTZ = tzSpinner.getSelectedItem().toString();
int selectedUpdateTimeout; int selectedUpdateTimeout = 0;
try { if (selectedType.equals("widgetCustom")) {
selectedUpdateTimeout = Integer.parseInt(updateTimeout.getText().toString()); try {
} catch (NumberFormatException e) { selectedUpdateTimeout = Integer.parseInt(updateTimeout.getText().toString());
GB.toast(getString(R.string.watchface_toast_settings_incomplete), Toast.LENGTH_SHORT, GB.WARN); } catch (NumberFormatException e) {
LOG.warn("Error parsing input", e); GB.toast(getString(R.string.watchface_toast_settings_incomplete), Toast.LENGTH_SHORT, GB.WARN);
return; LOG.warn("Error parsing input", e);
return;
}
} }
boolean selectedTimeoutHideText = timeoutHideText.isChecked(); boolean selectedTimeoutHideText = timeoutHideText.isChecked();
boolean selectedTimeoutShowCircle = timeoutShowCircle.isChecked(); boolean selectedTimeoutShowCircle = timeoutShowCircle.isChecked();