Context methods

This commit is contained in:
ChristianVisintin
2020-12-19 21:47:03 +01:00
parent 021f860ca6
commit 4d7ea1cdb4
2 changed files with 4 additions and 4 deletions

View File

@@ -166,7 +166,7 @@ impl Activity for AuthActivity {
// Set context
self.context = Some(context);
// Clear terminal
let _ = self.context.as_mut().unwrap().terminal.clear();
self.context.as_mut().unwrap().clear_screen();
// Put raw mode on enabled
let _ = enable_raw_mode();
self.input_mode = InputMode::Form;
@@ -215,7 +215,7 @@ impl Activity for AuthActivity {
// Clear terminal and return
match self.context.take() {
Some(mut ctx) => {
let _ = ctx.terminal.clear();
ctx.clear_screen();
Some(ctx)
}
None => None,

View File

@@ -346,7 +346,7 @@ impl Activity for FileTransferActivity {
// Set context
self.context = Some(context);
// Clear terminal
let _ = self.context.as_mut().unwrap().terminal.clear();
self.context.as_mut().unwrap().clear_screen();
// Put raw mode on enabled
let _ = enable_raw_mode();
// Set working directory
@@ -404,7 +404,7 @@ impl Activity for FileTransferActivity {
// Clear terminal and return
match self.context.take() {
Some(mut ctx) => {
let _ = ctx.terminal.clear();
ctx.clear_screen();
Some(ctx)
}
None => None,