Add key binding to download more logs
This commit is contained in:
parent
4956027027
commit
669e52a2ee
3 changed files with 14 additions and 0 deletions
|
|
@ -19,6 +19,7 @@ Procedure when bumping the version number:
|
|||
- Authentication dialog for password-protected rooms
|
||||
- Error popups in rooms when something goes wrong
|
||||
- `--ephemeral` flag that prevents cove from storing data permanently
|
||||
- Key binding to download more logs
|
||||
|
||||
### Changed
|
||||
- Reduced amount of unnecessary redraws
|
||||
|
|
|
|||
|
|
@ -458,6 +458,12 @@ impl Room {
|
|||
.map_err(|_| Error::Stopped)
|
||||
}
|
||||
|
||||
pub fn log(&self) -> Result<(), Error> {
|
||||
self.event_tx
|
||||
.send(Event::RequestLogs)
|
||||
.map_err(|_| Error::Stopped)
|
||||
}
|
||||
|
||||
pub fn nick(&self, name: String) -> Result<(), Error> {
|
||||
self.event_tx
|
||||
.send(Event::Nick(name))
|
||||
|
|
|
|||
|
|
@ -284,6 +284,7 @@ impl EuphRoom {
|
|||
}
|
||||
Some(Status::Joined(_)) => {
|
||||
bindings.binding("n", "change nick");
|
||||
bindings.binding("m", "download more messages");
|
||||
bindings.binding("A", "show account ui");
|
||||
true
|
||||
}
|
||||
|
|
@ -337,6 +338,12 @@ impl EuphRoom {
|
|||
self.state = State::Nick(nick::new(joined));
|
||||
true
|
||||
}
|
||||
key!('m') => {
|
||||
if let Some(room) = &self.room {
|
||||
let _ = room.log();
|
||||
}
|
||||
true
|
||||
}
|
||||
key!('A') => {
|
||||
self.state = State::Account(AccountUiState::new());
|
||||
true
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue