Add swipe action to rename cap
This commit is contained in:
@ -394,6 +394,17 @@ final class Database: ObservableObject {
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
func update(name: String, for capId: Int) -> Bool {
|
||||
guard var cap = caps[capId] else {
|
||||
log("Failed to update name for missing cap \(capId)")
|
||||
return false
|
||||
}
|
||||
cap.name = name
|
||||
caps[capId] = cap
|
||||
changedCaps.insert(capId)
|
||||
return true
|
||||
}
|
||||
|
||||
// MARK: Uploads
|
||||
|
||||
|
Reference in New Issue
Block a user