@@ -9,7 +9,6 @@ public struct FileSyncSession: Identifiable {
9
9
public let betaPath : String
10
10
public let status : FileSyncStatus
11
11
12
- public let maxSize : FileSyncSessionEndpointSize
13
12
public let localSize : FileSyncSessionEndpointSize
14
13
public let remoteSize : FileSyncSessionEndpointSize
15
14
@@ -25,14 +24,14 @@ public struct FileSyncSession: Identifiable {
25
24
} else {
26
25
" Unknown "
27
26
}
28
- if state. session. beta. protocol == Url_Protocol . ssh, !state. session. beta. host. isEmpty {
27
+ agentHost = if state. session. beta. protocol == Url_Protocol . ssh, !state. session. beta. host. isEmpty {
29
28
// TOOD: We need to either:
30
29
// - make this compatible with custom suffixes
31
30
// - always strip the tld
32
31
// - always keep the tld
33
- agentHost = state. session. beta. host
32
+ state. session. beta. host
34
33
} else {
35
- agentHost = " Unknown "
34
+ " Unknown "
36
35
}
37
36
betaPath = if !state. session. beta. path. isEmpty {
38
37
state. session. beta. path
@@ -64,7 +63,6 @@ public struct FileSyncSession: Identifiable {
64
63
dirCount: state. betaState. directories,
65
64
symLinkCount: state. betaState. symbolicLinks
66
65
)
67
- maxSize = localSize. maxOf ( other: remoteSize)
68
66
69
67
errors = accumulateErrors ( from: state)
70
68
}
@@ -77,9 +75,6 @@ public struct FileSyncSession: Identifiable {
77
75
78
76
public var sizeDescription : String {
79
77
var out = " "
80
- if localSize != remoteSize {
81
- out += " Maximum: \n \( maxSize. description ( linePrefix: " " ) ) \n \n "
82
- }
83
78
out += " Local: \n \( localSize. description ( linePrefix: " " ) ) \n \n "
84
79
out += " Remote: \n \( remoteSize. description ( linePrefix: " " ) ) "
85
80
return out
@@ -99,15 +94,6 @@ public struct FileSyncSessionEndpointSize: Equatable {
99
94
self . symLinkCount = symLinkCount
100
95
}
101
96
102
- func maxOf( other: FileSyncSessionEndpointSize ) -> FileSyncSessionEndpointSize {
103
- FileSyncSessionEndpointSize (
104
- sizeBytes: max ( sizeBytes, other. sizeBytes) ,
105
- fileCount: max ( fileCount, other. fileCount) ,
106
- dirCount: max ( dirCount, other. dirCount) ,
107
- symLinkCount: max ( symLinkCount, other. symLinkCount)
108
- )
109
- }
110
-
111
97
public var humanSizeBytes : String {
112
98
humanReadableBytes ( sizeBytes)
113
99
}
0 commit comments