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:
nvrl committed 2026-10-13 16:01:11 +02:00
1 parent 5b931111b3
commit abb3e3aaf8
10 files changed
+185

No files matched your search

+12
View File
@@ -316,6 +316,18 @@ final class AppModel {
}
}
/// Call a share something else. The library, history and downloads stay.
func renameShare(id: String, name: String) {
Task {
do {
_ = try await run { try $0.renameShare(shareId: id, name: name) }
} catch {
reportError(error)
}
reload()
}
}
func removeShare(_ id: String) {
Task {
let name = shares.first { $0.id == id }?.name ?? "the share"