Fix room deletion popup not checking entered name
From the looks of it, I accidentally broke it in v0.7.0 in commit
9bc6931fae.
This commit is contained in:
parent
13a4fa0938
commit
f4967731a1
2 changed files with 7 additions and 4 deletions
|
|
@ -25,6 +25,9 @@ Procedure when bumping the version number:
|
||||||
- The config file format was changed to support multiple euph servers with different domains.
|
- The config file format was changed to support multiple euph servers with different domains.
|
||||||
Options previously located at `euph.rooms.*` should be reviewed and moved to `euph.servers."euphoria.leet.nu".rooms.*`.
|
Options previously located at `euph.rooms.*` should be reviewed and moved to `euph.servers."euphoria.leet.nu".rooms.*`.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
- Room deletion popup accepting any room name
|
||||||
|
|
||||||
## v0.7.1 - 2023-08-31
|
## v0.7.1 - 2023-08-31
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
|
||||||
|
|
@ -596,14 +596,14 @@ impl Rooms {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
State::Delete(name, editor) => {
|
State::Delete(id, editor) => {
|
||||||
if event.matches(&keys.general.abort) {
|
if event.matches(&keys.general.abort) {
|
||||||
self.state = State::ShowList;
|
self.state = State::ShowList;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
if event.matches(&keys.general.confirm) {
|
if event.matches(&keys.general.confirm) && editor.text() == id.name {
|
||||||
self.euph_rooms.remove(name);
|
self.euph_rooms.remove(id);
|
||||||
logging_unwrap!(self.vault.euph().room(name.clone()).delete().await);
|
logging_unwrap!(self.vault.euph().room(id.clone()).delete().await);
|
||||||
self.state = State::ShowList;
|
self.state = State::ShowList;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue