mirror of https://github.com/oxen-io/session-ios
Fixed a crash which could occur when receiving a UserGroups config change
parent
4f86ea7a71
commit
22e59b1789
@ -0,0 +1,28 @@
|
||||
// Copyright © 2023 Rangeproof Pty Ltd. All rights reserved.
|
||||
//
|
||||
// stringlint:disable
|
||||
|
||||
import Foundation
|
||||
import SessionUtil
|
||||
import SessionUtilitiesKit
|
||||
|
||||
public extension LibSession {
|
||||
// MARK: - Config
|
||||
|
||||
enum Config {
|
||||
public enum Variant {
|
||||
case userProfile(UnsafeMutablePointer<config_object>)
|
||||
case contacts(UnsafeMutablePointer<config_object>)
|
||||
case convoInfoVolatile(UnsafeMutablePointer<config_object>)
|
||||
case userGroups(UnsafeMutablePointer<config_object>)
|
||||
|
||||
var conf: UnsafeMutablePointer<config_object> {
|
||||
switch self {
|
||||
case .userProfile(let value), .contacts(let value),
|
||||
.convoInfoVolatile(let value), .userGroups(let value):
|
||||
return value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue