Add integration tests based on VM
This commit is contained in:
+9
-1
@@ -269,6 +269,15 @@ impl UiState {
|
||||
}
|
||||
|
||||
pub fn select_peer_index(&mut self, peer_index: usize) -> bool {
|
||||
if !self.highlight_peer_index(peer_index) {
|
||||
return false;
|
||||
}
|
||||
self.screen = Screen::ClientDetails;
|
||||
true
|
||||
}
|
||||
|
||||
/// Move the client-list highlight without changing the active screen.
|
||||
pub fn highlight_peer_index(&mut self, peer_index: usize) -> bool {
|
||||
let Some(client) = self.view.as_ref().and_then(|view| {
|
||||
view.clients
|
||||
.iter()
|
||||
@@ -278,7 +287,6 @@ impl UiState {
|
||||
};
|
||||
self.selected_peer_index = Some(peer_index);
|
||||
self.selected_identity = client.identity;
|
||||
self.screen = Screen::ClientDetails;
|
||||
true
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user