feat: add visible flag for works
This commit is contained in:
@@ -39,6 +39,7 @@ pub fn square_hole_gallery_view(ctx: &AnonymousViewContext) -> Vec<SquareHoleGal
|
||||
.square_hole_work_profile()
|
||||
.by_square_hole_work_publication_status()
|
||||
.filter(SQUARE_HOLE_PUBLICATION_PUBLISHED)
|
||||
.filter(|row| row.visible)
|
||||
.filter_map(|row| match build_gallery_view_row(&row) {
|
||||
Ok(item) => Some(item),
|
||||
Err(error) => {
|
||||
@@ -537,6 +538,7 @@ fn compile_square_hole_draft_tx(
|
||||
play_count: 0,
|
||||
updated_at: compiled_at,
|
||||
published_at: None,
|
||||
visible: true,
|
||||
};
|
||||
upsert_work(ctx, work);
|
||||
replace_session(
|
||||
@@ -614,6 +616,7 @@ fn update_square_hole_work_tx(
|
||||
play_count: current.play_count,
|
||||
updated_at,
|
||||
published_at: current.published_at,
|
||||
visible: current.visible,
|
||||
};
|
||||
let snapshot = build_work_snapshot(&next)?;
|
||||
replace_work(ctx, ¤t, next);
|
||||
@@ -1141,6 +1144,7 @@ fn clone_work(row: &SquareHoleWorkProfileRow) -> SquareHoleWorkProfileRow {
|
||||
play_count: row.play_count,
|
||||
updated_at: row.updated_at,
|
||||
published_at: row.published_at,
|
||||
visible: row.visible,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user