,
/// Is among favorite problems
pub is_favorite: bool,
/// Added to personal challenges
- pub is_challenge: bool,
+ pub is_saved: bool,
}
impl UserInteraction {
pub fn new(wall_uid: v2::WallUid, problem_uid: v2::ProblemUid) -> Self {
Self {
wall_uid,
problem_uid,
- is_completed: false,
- is_flashed: false,
is_favorite: false,
- is_challenge: false,
+ completed_on: BTreeSet::new(),
+ flashed_on: BTreeSet::new(),
+ is_saved: false,
}
}
}
diff --git a/crates/ascend/src/pages/wall.rs b/crates/ascend/src/pages/wall.rs
index ba3b69d..3b408c5 100644
--- a/crates/ascend/src/pages/wall.rs
+++ b/crates/ascend/src/pages/wall.rs
@@ -78,6 +78,8 @@ pub fn Wall() -> impl IntoView {
}
});
+ let user_interaction = crate::resources::user_interaction(wall_uid, problem_uid.into());
+
let header_items = move || HeaderItems {
left: vec![],
middle: vec![HeaderItem {
@@ -98,6 +100,7 @@ pub fn Wall() -> impl IntoView {
let foo = RwSignal::new(false);
let bar = RwSignal::new(false);
+ let baz = RwSignal::new(false);
leptos::view! {
@@ -153,7 +156,7 @@ pub fn Wall() -> impl IntoView {
//
- Flash!
+ Flash
@@ -169,18 +172,48 @@ pub fn Wall() -> impl IntoView {
/>