Bumped tui-realm to 0.2.1

This commit is contained in:
veeso
2021-05-02 12:09:32 +02:00
parent 4bd18c1386
commit e90f561584
14 changed files with 87 additions and 83 deletions

View File

@@ -27,7 +27,7 @@
*/
// locals
use super::{FileExplorerTab, FileTransferActivity, FsEntry, LogLevel};
use tuirealm::Payload;
use tuirealm::{Payload, Value};
// externals
use std::path::PathBuf;
@@ -623,7 +623,7 @@ impl FileTransferActivity {
/// Get index of selected file in the local tab
fn get_local_file_idx(&self) -> Option<usize> {
match self.view.get_state(super::COMPONENT_EXPLORER_LOCAL) {
Some(Payload::Unsigned(idx)) => Some(idx),
Some(Payload::One(Value::Usize(idx))) => Some(idx),
_ => None,
}
}
@@ -633,7 +633,7 @@ impl FileTransferActivity {
/// Get index of selected file in the remote file
fn get_remote_file_idx(&self) -> Option<usize> {
match self.view.get_state(super::COMPONENT_EXPLORER_REMOTE) {
Some(Payload::Unsigned(idx)) => Some(idx),
Some(Payload::One(Value::Usize(idx))) => Some(idx),
_ => None,
}
}