mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-03 16:41:26 +01:00
feat(core,app,android,ios): rename a share
ShareStore::rename changes only the name; the id that the catalog, watch state and offline files are keyed by stays the same. Sync carries the change as it does any other change to the share's register. The desktop renames in the share's row. The phones rename from the share's menu. Before, the name given at add time was permanent short of removing the share.
This commit is contained in:
1 parent
5b931111b3
commit
abb3e3aaf8
10 files changed
+185
No files matched your search
@@ -696,6 +696,16 @@ impl Engine {
|
||||
});
|
||||
}
|
||||
|
||||
/// Call a share something else. See [`ShareStore::rename`].
|
||||
pub fn rename_share(&self, id: String, name: String) {
|
||||
let engine = self.clone();
|
||||
self.runtime
|
||||
.spawn_blocking(move || match engine.store.rename(&id, &name) {
|
||||
Ok(_) => engine.load_shares(),
|
||||
Err(error) => engine.fail("rename the share", error),
|
||||
});
|
||||
}
|
||||
|
||||
/// Re-supply the link behind a share whose stored secret is unreadable —
|
||||
/// a keyring that was reset — or whose custom password changed, keeping
|
||||
/// its catalog, watch state and downloads. See
|
||||
|
||||
Reference in new issue
Block a user