|
8 | 8 | import Combine
|
9 | 9 | import Foundation
|
10 | 10 |
|
11 |
| -/* |
12 |
| - struct UniqueserversandLogins: Hashable { |
13 |
| - var offsiteUsername: String? |
14 |
| - var offsiteServer: String? |
15 |
| - |
16 |
| - init(_ username: String, |
17 |
| - _ servername: String) |
18 |
| - { |
19 |
| - offsiteServer = servername |
20 |
| - offsiteUsername = username |
21 |
| - } |
22 |
| - |
23 |
| - func hash(into hasher: inout Hasher) { |
24 |
| - hasher.combine(offsiteUsername) |
25 |
| - hasher.combine(offsiteServer) |
26 |
| - } |
27 |
| - } |
28 |
| - */ |
29 | 11 | class ReadConfigurationJSON: NamesandPaths {
|
30 | 12 | var configurations: [Configuration]?
|
31 | 13 | var filenamedatastore = [SharedReference.shared.fileconfigurationsjson]
|
32 | 14 | var subscriptons = Set<AnyCancellable>()
|
33 | 15 | var validhiddenIDs = Set<Int>()
|
34 | 16 |
|
35 |
| - /* |
36 |
| - func setuniqueserversandlogins() -> [UniqueserversandLogins]? { |
37 |
| - let configs = configurations?.filter { |
38 |
| - SharedReference.shared.synctasks.contains($0.task) |
39 |
| - } |
40 |
| - guard configs?.count ?? 0 > 0 else { return nil } |
41 |
| - var uniqueserversandlogins = [UniqueserversandLogins]() |
42 |
| - for i in 0 ..< (configs?.count ?? 0) { |
43 |
| - if let config = configs?[i] { |
44 |
| - if config.offsiteUsername.isEmpty == false, config.offsiteServer.isEmpty == false { |
45 |
| - let record = UniqueserversandLogins(config.offsiteUsername, config.offsiteServer) |
46 |
| - if uniqueserversandlogins.filter({ ($0.offsiteUsername == record.offsiteUsername) && |
47 |
| - ($0.offsiteServer == record.offsiteServer) |
48 |
| - }).count == 0 { |
49 |
| - uniqueserversandlogins.append(record) |
50 |
| - } |
51 |
| - } |
52 |
| - } |
53 |
| - } |
54 |
| - return uniqueserversandlogins |
55 |
| - } |
56 |
| - */ |
57 | 17 | init(_ profile: String?) {
|
58 | 18 | super.init(.configurations)
|
59 | 19 | filenamedatastore.publisher
|
|
0 commit comments