A counted day's circle now shows only its count, centered in the circle and drawn in a color that reads on the filled circle, instead of a check with the number on top. Tapping a counting habit's day opens a dialog with the day's count, its daily target, and large minus and plus steps, instead of adding one per tap. Days with linked practice sessions count up from those sessions, never below them, and open the sessions from the dialog. For today the habit card also has minus and plus buttons beside the Today count. Co-Authored-By: Claude Opus 5.5 <[email protected]>
59 lines
2.5 KiB
Ziran
59 lines
2.5 KiB
Ziran
#import, file "../src/app/modal_rules.zi";
|
|
#import, file "../src/core/types.zi";
|
|
|
|
using ModalType;
|
|
|
|
#program_export
|
|
Answer :: () -> s32 {
|
|
// Current modal order must stay consistent across generated targets.
|
|
if cast(s32)ModalNone != 0 || cast(s32)ModalConfirmExitSession != 1 ||
|
|
cast(s32)ModalBottomNavConfig != 19 || cast(s32)ModalAppIconPicker != 23 ||
|
|
cast(s32)ModalHabitCount != 24 {
|
|
return 1
|
|
}
|
|
if !ModalValidOnScreen(cast(ModalType)ModalConfirmExitSession,
|
|
ScreenSession, false) ||
|
|
!ModalValidOnScreen(cast(ModalType)ModalConfirmExitSession,
|
|
ScreenMeditation, false) ||
|
|
!ModalValidOnScreen(cast(ModalType)ModalConfirmExitSession,
|
|
ScreenSunSalutation, false) ||
|
|
!ModalValidOnScreen(cast(ModalType)ModalConfirmExitSession,
|
|
ScreenPatterns, false) ||
|
|
ModalValidOnScreen(cast(ModalType)ModalConfirmExitSession,
|
|
ScreenStart, false) { return 2 }
|
|
if !ModalValidOnScreen(cast(ModalType)ModalMeditationSetup,
|
|
ScreenStart, false) ||
|
|
ModalValidOnScreen(cast(ModalType)ModalMeditationSetup,
|
|
ScreenHabits, false) { return 3 }
|
|
if !ModalValidOnScreen(cast(ModalType)ModalConfirmDeleteHabit,
|
|
ScreenHabitEdit, false) ||
|
|
!ModalValidOnScreen(cast(ModalType)ModalConfirmDeleteHabit,
|
|
ScreenHabits, true) ||
|
|
ModalValidOnScreen(cast(ModalType)ModalConfirmDeleteHabit,
|
|
ScreenHabits, false) { return 4 }
|
|
if !ModalValidOnScreen(cast(ModalType)ModalHabitPracticePicker,
|
|
ScreenHabitEdit, false) ||
|
|
!ModalValidOnScreen(cast(ModalType)ModalHabitPracticePicker,
|
|
ScreenHabits, true) ||
|
|
ModalValidOnScreen(cast(ModalType)ModalHabitPracticePicker,
|
|
ScreenStart, true) { return 5 }
|
|
if !ModalValidOnScreen(cast(ModalType)ModalBottomNavConfig,
|
|
ScreenCustomizeNav, false) ||
|
|
ModalValidOnScreen(cast(ModalType)ModalBottomNavConfig,
|
|
ScreenStart, false) { return 6 }
|
|
if !ModalValidOnScreen(cast(ModalType)ModalAboutDonation,
|
|
ScreenStart, false) ||
|
|
!ModalValidOnScreen(cast(ModalType)ModalAboutDonation,
|
|
ScreenSession, false) { return 7 }
|
|
// The count dialog belongs to the habits screen, in either tab.
|
|
if !ModalValidOnScreen(cast(ModalType)ModalHabitCount,
|
|
ScreenHabits, false) ||
|
|
!ModalValidOnScreen(cast(ModalType)ModalHabitCount,
|
|
ScreenHabits, true) ||
|
|
ModalValidOnScreen(cast(ModalType)ModalHabitCount,
|
|
ScreenHabitEdit, false) ||
|
|
ModalValidOnScreen(cast(ModalType)ModalHabitCount,
|
|
ScreenStart, false) { return 8 }
|
|
return 42
|
|
}
|