Skip to content

Commit

Permalink
Remove unused method
Browse files Browse the repository at this point in the history
  • Loading branch information
tekezo committed Aug 7, 2024
1 parent 3fd0b82 commit 682fb5d
Showing 1 changed file with 0 additions and 32 deletions.
32 changes: 0 additions & 32 deletions src/apps/share/swift/LibKrbn/Settings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -214,38 +214,6 @@ extension LibKrbn {
// Do not to call `save()` here because partial settings will be erased at save.
}

public func appendSimpleModification(
jsonString: String,
device: ConnectedDevice?
) {
if let jsonData = jsonString.data(using: .utf8) {
if let jsonDict = try? JSONSerialization.jsonObject(with: jsonData, options: [])
as? [String: Any]
{
let fromJsonString =
SimpleModification.formatCompactJsonString(jsonObject: jsonDict["from"] ?? "") ?? "{}"
let toJsonString =
SimpleModification.formatCompactJsonString(jsonObject: jsonDict["to"] ?? "") ?? "[]"

libkrbn_core_configuration_push_back_selected_profile_simple_modification(
device?.libkrbnDeviceIdentifiers)

let size = libkrbn_core_configuration_get_selected_profile_simple_modifications_size(
device?.libkrbnDeviceIdentifiers)

libkrbn_core_configuration_replace_selected_profile_simple_modification(
size - 1,
fromJsonString.cString(using: .utf8),
toJsonString.cString(using: .utf8),
device?.libkrbnDeviceIdentifiers)

reflectSimpleModificationChanges(device)

// Do not to call `save()` here because partial settings will be erased at save.
}
}
}

public func removeSimpleModification(
index: Int,
device: ConnectedDevice?
Expand Down

0 comments on commit 682fb5d

Please sign in to comment.