web: remove some unused code

This commit is contained in:
2023-12-02 09:34:26 -08:00
parent 0a7cdefda3
commit ef8362d6f2
2 changed files with 1 additions and 33 deletions

View File

@@ -147,19 +147,6 @@ pub fn update(msg: Msg, model: &mut Model, orders: &mut impl Orders<Msg>) {
error!("fetch failed {:?}", fetch_error);
}
Msg::ShowRequest(tid) => {
orders
.skip()
.perform_cmd(async move { Msg::ShowResult(api::show_request(&tid).await) });
}
Msg::ShowResult(Ok(response_data)) => {
debug!("fetch ok {:#?}", response_data);
model.context = Context::Thread(response_data);
}
Msg::ShowResult(Err(fetch_error)) => {
error!("fetch failed {:?}", fetch_error);
}
Msg::ShowPrettyRequest(tid) => {
orders.skip().perform_cmd(async move {
Msg::ShowPrettyResult(api::show_pretty_request(&tid).await)
@@ -327,6 +314,7 @@ pub struct Model {
}
#[derive(Error, Debug)]
#[allow(dead_code)] // Remove once the UI is showing errors
pub enum UIError {
#[error("No error, this should never be presented to user")]
NoError,
@@ -378,8 +366,6 @@ pub enum Msg {
results_per_page: usize,
},
SearchResult(fetch::Result<shared::SearchResult>),
ShowRequest(String),
ShowResult(fetch::Result<ThreadSet>),
ShowPrettyRequest(String),
ShowPrettyResult(fetch::Result<ThreadSet>),
NextPage,