Abort upload/download pressing Ctrl+C

This commit is contained in:
ChristianVisintin
2020-12-12 22:00:12 +01:00
parent 3e72787625
commit a8a9cb9d2e
5 changed files with 95 additions and 23 deletions

View File

@@ -342,16 +342,8 @@ impl Activity for FileTransferActivity {
// Redraw
redraw = true;
}
// Handle input events
if let Ok(event) = self.context.as_ref().unwrap().input_hnd.read_event() {
// Iterate over input events
if let Some(event) = event {
// Handle event
self.handle_input_event(&event);
// Set redraw to true
redraw = true;
}
}
// Handle input events (if false, becomes true; otherwise remains true)
redraw |= self.read_input_event();
// @! draw interface
if redraw {
self.draw();