mirror of
https://github.com/veeso/termscp.git
synced 2025-12-07 09:36:00 -08:00
Context methods
This commit is contained in:
@@ -166,7 +166,7 @@ impl Activity for AuthActivity {
|
|||||||
// Set context
|
// Set context
|
||||||
self.context = Some(context);
|
self.context = Some(context);
|
||||||
// Clear terminal
|
// Clear terminal
|
||||||
let _ = self.context.as_mut().unwrap().terminal.clear();
|
self.context.as_mut().unwrap().clear_screen();
|
||||||
// Put raw mode on enabled
|
// Put raw mode on enabled
|
||||||
let _ = enable_raw_mode();
|
let _ = enable_raw_mode();
|
||||||
self.input_mode = InputMode::Form;
|
self.input_mode = InputMode::Form;
|
||||||
@@ -215,7 +215,7 @@ impl Activity for AuthActivity {
|
|||||||
// Clear terminal and return
|
// Clear terminal and return
|
||||||
match self.context.take() {
|
match self.context.take() {
|
||||||
Some(mut ctx) => {
|
Some(mut ctx) => {
|
||||||
let _ = ctx.terminal.clear();
|
ctx.clear_screen();
|
||||||
Some(ctx)
|
Some(ctx)
|
||||||
}
|
}
|
||||||
None => None,
|
None => None,
|
||||||
|
|||||||
@@ -346,7 +346,7 @@ impl Activity for FileTransferActivity {
|
|||||||
// Set context
|
// Set context
|
||||||
self.context = Some(context);
|
self.context = Some(context);
|
||||||
// Clear terminal
|
// Clear terminal
|
||||||
let _ = self.context.as_mut().unwrap().terminal.clear();
|
self.context.as_mut().unwrap().clear_screen();
|
||||||
// Put raw mode on enabled
|
// Put raw mode on enabled
|
||||||
let _ = enable_raw_mode();
|
let _ = enable_raw_mode();
|
||||||
// Set working directory
|
// Set working directory
|
||||||
@@ -404,7 +404,7 @@ impl Activity for FileTransferActivity {
|
|||||||
// Clear terminal and return
|
// Clear terminal and return
|
||||||
match self.context.take() {
|
match self.context.take() {
|
||||||
Some(mut ctx) => {
|
Some(mut ctx) => {
|
||||||
let _ = ctx.terminal.clear();
|
ctx.clear_screen();
|
||||||
Some(ctx)
|
Some(ctx)
|
||||||
}
|
}
|
||||||
None => None,
|
None => None,
|
||||||
|
|||||||
Reference in New Issue
Block a user