[habit][library] Habit: the local day with rollover, days read, the forgiving weekly streak, the reminder schedule, medals as a pure function of the log; sessions carry their UTC offset
This commit is contained in:
@@ -177,11 +177,18 @@ pub fn ops_from(lib: &Library) -> Vec<Op> {
|
||||
active_ms: s.active_ms,
|
||||
pages: s.pages,
|
||||
date: s.date.clone(),
|
||||
offset_min: s.offset_min,
|
||||
});
|
||||
}
|
||||
for g in lib.goals.values() {
|
||||
ops.push(Op::Goal { year: g.year, kind: g.kind, target: g.target });
|
||||
}
|
||||
if let Some(h) = lib.habit {
|
||||
ops.push(Op::HabitGoal { goal: h });
|
||||
}
|
||||
for m in &lib.medals_seen {
|
||||
ops.push(Op::MedalSeen { medal: m.clone() });
|
||||
}
|
||||
ops
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user