feat: update shared directories at runtime
Client::set_shared_directories rescans the given roots into a fresh in-memory index, swaps it for peers, and re-announces the folder/file counts to the server. The current directory list moves into the client context so the running set is queryable. e2e-verified: a browser sees a directory that was added after login.
This commit is contained in:
@@ -354,7 +354,7 @@ impl MainTui {
|
||||
let shortcuts_line = format_shortcuts_styled(&shortcuts);
|
||||
// Surface our own sharing status in the block title.
|
||||
let shared = self.client.shared_directories();
|
||||
let sharing = match shared {
|
||||
let sharing = match shared.as_slice() {
|
||||
[] => "off".to_string(),
|
||||
[only] => only.clone(),
|
||||
more => format!("{} folders", more.len()),
|
||||
|
||||
Reference in New Issue
Block a user