Skip to content

Commit

Permalink
6.7.0 - Fixed bug in 45s menu preparation/finalization time. Reordere…
Browse files Browse the repository at this point in the history
…d global settings menu and view by most common use. Fixed string too long in some languages.
  • Loading branch information
dliedke committed Jan 8, 2024
1 parent a989fe6 commit aa3bb2c
Show file tree
Hide file tree
Showing 8 changed files with 81 additions and 29 deletions.
2 changes: 1 addition & 1 deletion Meditate/manifest.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<!-- This is a generated file. It is highly recommended that you DO NOT edit this file. -->
<iq:manifest xmlns:iq="http://www.garmin.com/xml/connectiq" version="3">
<iq:application entry="MeditateApp" id="9abb375dcf7c4ace87ff66f4f774f6c8" launcherIcon="@Drawables.launcherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watch-app" version="6.6.0">
<iq:application entry="MeditateApp" id="9abb375dcf7c4ace87ff66f4f774f6c8" launcherIcon="@Drawables.launcherIcon" minSdkVersion="3.0.0" name="@Strings.AppName" type="watch-app" version="6.7.0">
<iq:products>
<iq:product id="approachs62"/>
<iq:product id="approachs7042mm"/>
Expand Down
8 changes: 4 additions & 4 deletions Meditate/resources-deu/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
<string id="menuGlobalSettings_prepareTime">Vorb.-Zeit</string>
<string id="menuGlobalSettings_finalizeTime">Abschl.-Zeit</string>
<string id="menuGlobalSettings_respiration">Atmung: </string>
<string id="menuGlobalSettings_save">Speichern: </string>
<string id="menuGlobalSettings_save">Speich.: </string>

<string id="menuNewActivityTypeOptions_title">Aktivität</string>
<string id="menuNewActivityTypeOptions_yoga">Yoga</string>
Expand All @@ -62,8 +62,8 @@

<string id="menuConfirmSaveActivityOptions_title">Speich. best.</string>
<string id="menuConfirmSaveActivityOptions_ask">Fragen (Standard)</string>
<string id="menuConfirmSaveActivityOptions_autoYes">Automatisch Ja</string>
<string id="menuConfirmSaveActivityOptions_autoNo">Automatisch Nein</string>
<string id="menuConfirmSaveActivityOptions_autoYes">Auto Ja</string>
<string id="menuConfirmSaveActivityOptions_autoNo">Auto Nein</string>
<string id="menuConfirmSaveActivityOptions_askSimple">Fragen</string>

<string id="menuMultiSessionOptions_title">Mehr. Sitz.</string>
Expand Down Expand Up @@ -154,7 +154,7 @@
<string id="HRVready">HRV Bereit</string>
<string id="HRVoff">HRV aus</string>

<string id="about_AppVersion">Meditate 6.6.0</string>
<string id="about_AppVersion">Meditate 6.7.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>

Expand Down
6 changes: 3 additions & 3 deletions Meditate/resources-por/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,13 @@
<string id="menuMultiSessionOptions_yes">Sim</string>
<string id="menuMultiSessionOptions_no">Não (Padrão)</string>

<string id="menuRespirationRateOptions_title">Taxa de Respiração</string>
<string id="menuRespirationRateOptions_title">Respiração</string>
<string id="menuRespirationRateOptions_on">Lig. (Padrão)</string>
<string id="menuRespirationRateOptions_off">Deslig.</string>

<string id="menuAutoStopOptions_title">Parada Auto</string>
<string id="menuAutoStopOptions_on">Lig. (Padrão)</string>
<string id="menuAutoStopOptions_off">Deslig.</string>
<string id="menuAutoStopOptions_off">Desl.</string>

<string id="menuPrepareTimeOptions_title">Preparação</string>
<string id="menuFinalizeTimeOptions_title">Finalização</string>
Expand Down Expand Up @@ -155,7 +155,7 @@
<string id="HRVready">VFC Pronto</string>
<string id="HRVoff">VFC Deslig.</string>

<string id="about_AppVersion">Meditate 6.6.0</string>
<string id="about_AppVersion">Meditate 6.7.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>

Expand Down
16 changes: 8 additions & 8 deletions Meditate/resources-spa/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,26 +57,26 @@

<string id="menuHrvTrackingOptions_title">Seguimiento HRV</string>
<string id="menuHrvTrackingOptions_onDetailed">En Detalle (Predet.)</string>
<string id="menuHrvTrackingOptions_on">Activado</string>
<string id="menuHrvTrackingOptions_off">Desactivado</string>
<string id="menuHrvTrackingOptions_on">Act.</string>
<string id="menuHrvTrackingOptions_off">Desac.</string>

<string id="menuConfirmSaveActivityOptions_title">Confirmar Guardado</string>
<string id="menuConfirmSaveActivityOptions_ask">Preguntar (Predet.)</string>
<string id="menuConfirmSaveActivityOptions_autoYes">Sí Automático</string>
<string id="menuConfirmSaveActivityOptions_autoNo">No Automático</string>
<string id="menuConfirmSaveActivityOptions_autoYes">Sí Auto</string>
<string id="menuConfirmSaveActivityOptions_autoNo">No Auto</string>
<string id="menuConfirmSaveActivityOptions_askSimple">Preguntar</string>

<string id="menuMultiSessionOptions_title">Multi-Sesión</string>
<string id="menuMultiSessionOptions_yes">Sí</string>
<string id="menuMultiSessionOptions_no">No (Predet.)</string>

<string id="menuRespirationRateOptions_title">Tasa Respiración</string>
<string id="menuRespirationRateOptions_title">Respiración</string>
<string id="menuRespirationRateOptions_on">Activado (Predet.)</string>
<string id="menuRespirationRateOptions_off">Desactivado</string>

<string id="menuAutoStopOptions_title">Parada Auto</string>
<string id="menuAutoStopOptions_on">Activado (Predet.)</string>
<string id="menuAutoStopOptions_off">Desactivado</string>
<string id="menuAutoStopOptions_on">Activ. (Predet.)</string>
<string id="menuAutoStopOptions_off">Des.</string>

<string id="menuPrepareTimeOptions_title">Preparación</string>
<string id="menuFinalizeTimeOptions_title">Finalización</string>
Expand Down Expand Up @@ -154,7 +154,7 @@
<string id="HRVready">HRV Listo</string>
<string id="HRVoff">HRV apagado</string>

<string id="about_AppVersion">Meditate 6.6.0</string>
<string id="about_AppVersion">Meditate 6.7.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<menu id="globalSettingsMenu" title="@Strings.menuGlobalSettings_title">
<menu-item id="hrvTracking" label="@Strings.menuGlobalSettings_newHrvTracking" />
<menu-item id="autoStop" label="@Strings.menuGlobalSettings_autoStop" />
<menu-item id="confirmSaveActivity" label="@Strings.menuGlobalSettings_confirmSaveActivity" />
<menu-item id="multiSession" label="@Strings.menuGlobalSettings_multiSession" />
<menu-item id="prepareTime" label="@Strings.menuGlobalSettings_prepareTime" />
<menu-item id="finalizeTime" label="@Strings.menuGlobalSettings_finalizeTime" />
<menu-item id="autoStop" label="@Strings.menuGlobalSettings_autoStop" />
<menu-item id="respirationRate" label="@Strings.menuGlobalSettings_respirationRate" />
<menu-item id="newActivityType" label="@Strings.menuGlobalSettings_newActivityType" />
<menu-item id="hrvTracking" label="@Strings.menuGlobalSettings_newHrvTracking" />
<menu-item id="respirationRate" label="@Strings.menuGlobalSettings_respirationRate" />
<menu-item id="multiSession" label="@Strings.menuGlobalSettings_multiSession" />
</menu>
4 changes: 2 additions & 2 deletions Meditate/resources/strings/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
<string id="menuMultiSessionOptions_yes">Yes</string>
<string id="menuMultiSessionOptions_no">No (Default)</string>

<string id="menuRespirationRateOptions_title">Respiration Rate</string>
<string id="menuRespirationRateOptions_title">Respiration</string>
<string id="menuRespirationRateOptions_on">On (Default)</string>
<string id="menuRespirationRateOptions_off">Off</string>

Expand Down Expand Up @@ -154,7 +154,7 @@
<string id="HRVready">HRV Ready</string>
<string id="HRVoff">HRV off</string>

<string id="about_AppVersion">Meditate 6.6.0</string>
<string id="about_AppVersion">Meditate 6.7.0</string>
<string id="about_vtrifonov"> vtrifonov</string>
<string id="about_dliedke"> dliedke</string>

Expand Down
60 changes: 53 additions & 7 deletions Meditate/source/globalSettings/GlobalSettingsDelegate.mc
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,38 @@ class GlobalSettingsDelegate extends ScreenPicker.ScreenPickerDelegate {
details.titleColor = Gfx.COLOR_WHITE;
details.color = Gfx.COLOR_WHITE;
details.backgroundColor = Gfx.COLOR_BLACK;

// HRV settings

// Auto stop settings
var autoStopSetting = "";
var autoStop = GlobalSettings.loadAutoStop();

if (autoStop == AutoStop.On) {

// In order to avoid the (default) text in string "menuAutoStopOptions_on"
autoStopSetting = Ui.loadResource(Rez.Strings.menuHrvTrackingOptions_on);

details.detailLines[1].icon = new ScreenPicker.Icon({
:font => StatusIconFonts.fontAwesomeFreeSolid,
:symbol => StatusIconFonts.Rez.Strings.faRepeatSession,
:color => Gfx.COLOR_RED
});
}
if (autoStop == AutoStop.Off) {
autoStopSetting = Ui.loadResource(Rez.Strings.menuAutoStopOptions_off);

details.detailLines[1].icon = new ScreenPicker.Icon({
:font => StatusIconFonts.fontAwesomeFreeSolid,
:symbol => StatusIconFonts.Rez.Strings.faRepeatSession,
:color => Gfx.COLOR_GREEN
});
}

var autoStopTitle = Ui.loadResource(Rez.Strings.menuAutoStopOptions_title);
details.detailLines[1].value.text = autoStopTitle + ": " + autoStopSetting;


// HRV settings (not enough screen space for everything)
/*
details.detailLines[1].icon = new ScreenPicker.HrvIcon({});
var hrvTrackingSetting;
var hrvTracking = GlobalSettings.loadHrvTracking();
Expand All @@ -75,6 +105,7 @@ class GlobalSettingsDelegate extends ScreenPicker.ScreenPickerDelegate {
hrvTrackingSetting = Ui.loadResource(Rez.Strings.menuNewHrvTrackingOptions_off);
}
details.detailLines[1].value.text = "HRV: " + hrvTrackingSetting;
*/

// Confirm save activity settings
var confirmSaveSetting = "";
Expand Down Expand Up @@ -104,7 +135,8 @@ class GlobalSettingsDelegate extends ScreenPicker.ScreenPickerDelegate {
}
details.detailLines[2].value.text = Ui.loadResource(Rez.Strings.menuGlobalSettings_save) + confirmSaveSetting;

// Multi-session settings
// Multi-session settings (not enough screen space for everything)
/*
var multiSessionSetting = "";
var multiSession = GlobalSettings.loadMultiSession();
details.detailLines[3].icon = new ScreenPicker.Icon({
Expand All @@ -118,11 +150,10 @@ class GlobalSettingsDelegate extends ScreenPicker.ScreenPickerDelegate {
multiSessionSetting = Ui.loadResource(Rez.Strings.menuGlobalSettings_singleSession);
}
details.detailLines[3].value.text = multiSessionSetting;


*/

// Preparation time settings
details.detailLines[4].icon = new ScreenPicker.Icon({
details.detailLines[3].icon = new ScreenPicker.Icon({
:font => StatusIconFonts.fontAwesomeFreeRegular,
:symbol => StatusIconFonts.Rez.Strings.faClock
});
Expand All @@ -133,7 +164,22 @@ class GlobalSettingsDelegate extends ScreenPicker.ScreenPickerDelegate {
var seconds = prepareTimeSeconds % 60;

// Set the text with the remaining time in the format M:SS
details.detailLines[4].value.text = Ui.loadResource(Rez.Strings.menuPrepareTimeOptions_title) + ": " + minutes + ":" + (seconds < 10 ? "0" : "") + seconds;
details.detailLines[3].value.text = Ui.loadResource(Rez.Strings.menuPrepareTimeOptions_title) + ": " + minutes + ":" + (seconds < 10 ? "0" : "") + seconds;


// Finalize time settings
details.detailLines[4].icon = new ScreenPicker.Icon({
:font => StatusIconFonts.fontAwesomeFreeRegular,
:symbol => StatusIconFonts.Rez.Strings.faClock
});

// Calculate minutes and seconds from the loaded prepare time
var finalizeTimeSeconds = GlobalSettings.loadFinalizeTime();
minutes = finalizeTimeSeconds / 60;
seconds = finalizeTimeSeconds % 60;

// Set the text with the remaining time in the format M:SS
details.detailLines[4].value.text = Ui.loadResource(Rez.Strings.menuFinalizeTimeOptions_title) + ": " + minutes + ":" + (seconds < 10 ? "0" : "") + seconds;


// New Activity type settings
Expand Down
6 changes: 6 additions & 0 deletions Meditate/source/globalSettings/GlobalSettingsMenuDelegate.mc
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@ class GlobalSettingsMenuDelegate extends Ui.MenuInputDelegate {
else if (item == :time_30s) {
GlobalSettings.savePrepareTime(30);
}
else if (item == :time_45s) {
GlobalSettings.savePrepareTime(45);
}
else if (item == :time_1m) {
GlobalSettings.savePrepareTime(60);
}
Expand Down Expand Up @@ -132,6 +135,9 @@ class GlobalSettingsMenuDelegate extends Ui.MenuInputDelegate {
else if (item == :time_30s) {
GlobalSettings.saveFinalizeTime(30);
}
else if (item == :time_45s) {
GlobalSettings.saveFinalizeTime(45);
}
else if (item == :time_1m) {
GlobalSettings.saveFinalizeTime(60);
}
Expand Down

0 comments on commit aa3bb2c

Please sign in to comment.