mirror of
https://github.com/narrrl/proton-stream.git
synced 2026-11-04 08:56:59 +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
@@ -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"
|
||||
|
||||
Reference in new issue
Block a user