Copies broadcast code from the server

multistore
Laurent 1 year ago
parent 6e26222300
commit f8de5cfa65
  1. 6
      PadelClub/Data/Club.swift

@ -53,6 +53,12 @@ class Club : ModelObject, Storable, Hashable {
self.broadcastCode = broadcastCode self.broadcastCode = broadcastCode
} }
override func onServerInsert(serverCopy: any Storable) -> Bool {
guard let copy = serverCopy as? Club else { return false }
self.broadcastCode = copy.broadcastCode
return true
}
func clubTitle(_ displayStyle: DisplayStyle = .wide) -> String { func clubTitle(_ displayStyle: DisplayStyle = .wide) -> String {
switch displayStyle { switch displayStyle {
case .wide, .title: case .wide, .title:

Loading…
Cancel
Save