Replace the remaining .kry and C application sources with Ziran modules, move vendored dependencies to their current pointers, and add Ziran tests for the ported hosts and policies. Co-Authored-By: Claude Opus 5.5 <[email protected]>
44 lines
1.4 KiB
Ziran
44 lines
1.4 KiB
Ziran
#import, file "../src/app/sync_safety_policy.zi";
|
|
#import, file "../src/core/types.zi";
|
|
|
|
#program_export
|
|
Answer :: () -> s32 {
|
|
state: SyncSafetyState
|
|
state.screen = ScreenHabits
|
|
if !BackgroundSyncSafe(state) { return 1 }
|
|
|
|
state.modal_active = 1
|
|
if BackgroundSyncSafe(state) { return 2 }
|
|
state.modal_active = 0
|
|
|
|
state.habit_edit_active = 1
|
|
if BackgroundSyncSafe(state) { return 4 }
|
|
state.habit_edit_active = 0
|
|
state.server_url_focused = 1
|
|
if BackgroundSyncSafe(state) { return 5 }
|
|
state.server_url_focused = 0
|
|
state.alias_focused = 1
|
|
if BackgroundSyncSafe(state) { return 6 }
|
|
state.alias_focused = 0
|
|
state.friend_input_focused = 1
|
|
if BackgroundSyncSafe(state) { return 7 }
|
|
state.friend_input_focused = 0
|
|
|
|
state.screen = ScreenPracticeSession
|
|
if BackgroundSyncSafe(state) { return 8 }
|
|
state.screen = ScreenMeditation
|
|
if BackgroundSyncSafe(state) { return 9 }
|
|
state.screen = ScreenSunSalutation
|
|
if BackgroundSyncSafe(state) { return 10 }
|
|
state.screen = ScreenHabits
|
|
|
|
if SyncUserIdle(2.49, 1.0, false) ||
|
|
!SyncUserIdle(2.50, 1.0, false) ||
|
|
SyncUserIdle(3.0, 1.0, true) { return 11 }
|
|
if !SyncUiRefreshSafe(state, 2.50, 1.0, false) ||
|
|
SyncUiRefreshSafe(state, 2.50, 1.0, true) { return 12 }
|
|
state.screen = ScreenStart
|
|
if SyncUiRefreshSafe(state, 3.0, 1.0, false) { return 13 }
|
|
return 42
|
|
}
|