fix pagination + add refresh button
All checks were successful
tests / fmt (push) Successful in 1m57s
tests / test (push) Successful in 2m7s
tests / clippy (push) Successful in 2m5s
tests / build (push) Successful in 2m11s
tests / pre-commit (push) Successful in 2m5s
deploy / release-image (push) Successful in 5m3s
All checks were successful
tests / fmt (push) Successful in 1m57s
tests / test (push) Successful in 2m7s
tests / clippy (push) Successful in 2m5s
tests / build (push) Successful in 2m11s
tests / pre-commit (push) Successful in 2m5s
deploy / release-image (push) Successful in 5m3s
This commit is contained in:
@@ -70,9 +70,6 @@ pub(crate) async fn build_queue_embeds(queue: &[TrackHandle], page: usize) -> Ve
|
||||
}
|
||||
|
||||
pub(crate) fn build_action_row(page: usize, max_pages: usize) -> Vec<Component> {
|
||||
if max_pages == 0 {
|
||||
return Vec::new();
|
||||
}
|
||||
vec![Component::ActionRow(ActionRow {
|
||||
components: vec![
|
||||
Component::Button(Button {
|
||||
@@ -85,6 +82,16 @@ pub(crate) fn build_action_row(page: usize, max_pages: usize) -> Vec<Component>
|
||||
url: None,
|
||||
disabled: page == 0,
|
||||
}),
|
||||
Component::Button(Button {
|
||||
custom_id: Some(format!("page:{}", page)),
|
||||
style: ButtonStyle::Primary,
|
||||
label: Some("Refresh".to_string()),
|
||||
emoji: Some(ReactionType::Unicode {
|
||||
name: "🔄".to_string(),
|
||||
}),
|
||||
url: None,
|
||||
disabled: false,
|
||||
}),
|
||||
Component::Button(Button {
|
||||
custom_id: Some(format!("page:{}", page + 1)),
|
||||
style: ButtonStyle::Primary,
|
||||
|
||||
Reference in New Issue
Block a user