page field added to LibraryRequest struct
@@ -47,6 +47,7 @@ pub struct LibraryRequest {
pub r#type: Option<String>,
#[serde(default)]
pub sort: Sort,
+ pub page: usize,
}
#[derive(Clone, PartialEq, Serialize, Deserialize)]
@@ -162,6 +163,10 @@ fn selectable_update<F: LibraryFilter>(
.as_ref()
.map(|selected| selected.request.sort.to_owned())
.unwrap_or_default(),
+ page: selected
+ .as_ref()
+ .map(|selected| selected.request.page.to_owned())
+ .unwrap_or(1),
},
selected: selected
.as_ref()
@@ -177,6 +182,7 @@ fn selectable_update<F: LibraryFilter>(
.as_ref()
.map(|selected| selected.request.sort.to_owned())
.unwrap_or_default(),
+ page: 1,
},
selected: selected
.as_ref()
@@ -193,6 +199,10 @@ fn selectable_update<F: LibraryFilter>(
.as_ref()
.and_then(|selected| selected.request.r#type.to_owned()),
sort: sort.to_owned(),
+ page: selected
+ .as_ref()
+ .map(|selected| selected.request.page.to_owned())
+ .unwrap_or(1),
},
selected: selected
.as_ref()
