mirror of
https://github.com/figsoda/mmtc
synced 2024-11-26 08:50:18 +00:00
rename ClearQuery to QuitSearch
This commit is contained in:
parent
11246d5798
commit
c316bbab14
1 changed files with 4 additions and 4 deletions
|
@ -104,7 +104,7 @@ enum Command {
|
|||
InputSearch(char),
|
||||
BackspaceSearch,
|
||||
UpdateSearch,
|
||||
ClearQuery,
|
||||
QuitSearch,
|
||||
Searching(bool),
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ async fn run() -> Result<()> {
|
|||
Event::Key(KeyEvent { code, .. }) => match code {
|
||||
KeyCode::Esc => {
|
||||
searching = false;
|
||||
Some(Command::ClearQuery)
|
||||
Some(Command::QuitSearch)
|
||||
}
|
||||
KeyCode::Down => Some(Command::Down),
|
||||
KeyCode::Up => Some(Command::Up),
|
||||
|
@ -443,7 +443,7 @@ async fn run() -> Result<()> {
|
|||
};
|
||||
tx.send(Command::UpdateStatus).await?;
|
||||
if clear_query_on_play {
|
||||
tx.send(Command::ClearQuery).await?;
|
||||
tx.send(Command::QuitSearch).await?;
|
||||
}
|
||||
tx.send(Command::UpdateFrame).await?;
|
||||
}
|
||||
|
@ -547,7 +547,7 @@ async fn run() -> Result<()> {
|
|||
liststate.select(Some(0));
|
||||
tx.send(Command::UpdateFrame).await?;
|
||||
}
|
||||
Command::ClearQuery => {
|
||||
Command::QuitSearch => {
|
||||
searching = false;
|
||||
if !query.is_empty() {
|
||||
query.clear();
|
||||
|
|
Loading…
Reference in a new issue