multi selection should have the accessory on the leading side
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:31747cb106793a732577a3c2159acdb4147c1e3d7863e63e3725f1dc6732cdb0
|
||||
size 219215
|
||||
oid sha256:2f4c6058d144ac250c095c6382a48cc20e8e56fc199431671ce775486694b58d
|
||||
size 219336
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c048d0e4bff9bcc45be03eecb34e4150b7f8b184654448943e454e79c34fbf30
|
||||
size 232266
|
||||
oid sha256:1336722aea534e4caeb2eee6eb3913b54326eca68aa1adc7f294a4792744745b
|
||||
size 232371
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f72059b3920a5aaf2a4eb083a7046607bfc9e6067007ee6b30ff24c37bcbf007
|
||||
size 159314
|
||||
oid sha256:edc85fbadfab63374a4c9252139f5ba1e32dca82b4811291bdd1569ed04ec3e9
|
||||
size 159098
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:38c787a7b8cfaefb171fd4594bf7d619be18c5346bd06edb8fdb1992b69bf6df
|
||||
size 166097
|
||||
oid sha256:c3440a86868c74402f187db3f22c6e912acb151999196886411fc94b3acb0a63
|
||||
size 166063
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b1f34b0587f76f5355992c36195181caa0c2295d55550321ac2214e714cd3635
|
||||
size 215694
|
||||
oid sha256:5a5adce8b91ff7566a08a7ba87bff6e673ea35641ff62793d5f74756702e5dce
|
||||
size 215965
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:42546ac3874cf56b296254674682410bf22bcde2a9deb15cf5660b72cf365674
|
||||
size 226843
|
||||
oid sha256:e8d121cd15157ea9cdf41741bad439c695c3cb3f4b1a03d24af112eae75ef6b0
|
||||
size 227128
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a8bb93d60f29c30ee98bcc6f734ee31b53b3dac3ad06fd4d29385002f791b20d
|
||||
size 156455
|
||||
oid sha256:3dd89170126ab834d68d8e07b1e236170912a90d649e30fda8c8b3bf974db440
|
||||
size 156488
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:2690ec4617f689bc8543800ca22c60239e723698c79304f0c799ddbce0410761
|
||||
size 163182
|
||||
oid sha256:f86df1c62027193b38f41eef2c9073932ca6f260d7010524c9d1fbd401aefe94
|
||||
size 163383
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:bcf0895011c8f70b9a4064b6c48cc5b8ca7303f469244d84bf733d2c56285f0f
|
||||
size 227663
|
||||
oid sha256:6fc093aad1fb4c85e3215faf774336007a5dd3b79d518abcb5b40d4543e00602
|
||||
size 227904
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:42665a61151124f7567c63f8a345bd44f137880c6a173bb2f1e187ce3eaa8f13
|
||||
size 243767
|
||||
oid sha256:887e49f48a4fbf3cf8d500732d064129de51c5963546b0ba639f623f4e14f3e6
|
||||
size 244058
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:a495cb363d7d3063991b04c9d8361a2556abd5e2d5203b986fd61ca259886618
|
||||
size 161176
|
||||
oid sha256:0330ac9854242393c063db47fba43eca1ec18748d10493b8729f9bfbd8bda425
|
||||
size 161300
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:f442e58bac75cd13c45ae5ad57fc03312683e2dba236f23a817555be5a2d28fc
|
||||
size 175061
|
||||
oid sha256:e27bdb7c6f0cf1d900fea8b4963267a952d747db8b639226edfccb1205b436db
|
||||
size 175222
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:3aa37fdb6bab20b3eef8c2787937aa7dfc688a2e6a4c50e78cafc901b4ad86d0
|
||||
size 209677
|
||||
oid sha256:701b7b4c1ef1bef6a0c8ed79e515b2fb0bf595ee1187ee8ac3145b7e4fce478a
|
||||
size 209832
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8a82ae085aedbd14d2f9a54e9509c69cc3d26e55523c94c8cd0d86b3753a5a6b
|
||||
size 217370
|
||||
oid sha256:71009b4e3c2d226517062c78c27a55975efcd1a026c16bc18535f4f18eb9a758
|
||||
size 217520
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6feda5e32a45710402285dd07e1eee1f8774508b6ab924436bd283380d7e8998
|
||||
size 151547
|
||||
oid sha256:4088e3e252f1ac08ab8ef7f81e2b4782461b7d9465b6ebdfc10f5595e3f677f1
|
||||
size 151264
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:07d2b2bca87cba694c73a9ec0a8f85f57e05b008328e224f3fef74bf23f57647
|
||||
size 156542
|
||||
oid sha256:f7919f5242a50e391bce847bab78f4156312f22d83a341fe3a11f549184d8395
|
||||
size 156573
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -218,12 +218,22 @@ private struct RowContent<Label: View, DetailsIcon: View>: View {
|
||||
let label: () -> Label
|
||||
|
||||
var body: some View {
|
||||
HStack(spacing: ListRowTrailingSectionSpacing.horizontal) {
|
||||
label()
|
||||
.frame(maxWidth: .infinity)
|
||||
HStack(spacing: 0) {
|
||||
// We should always have multi selection shown on the leading side
|
||||
if let accessory, accessory.kind.isMultiSelection {
|
||||
accessory
|
||||
.padding(.leading, ListRowPadding.horizontal)
|
||||
}
|
||||
|
||||
if details != nil || accessory != nil {
|
||||
ListRowTrailingSection(details, accessory: accessory)
|
||||
HStack(spacing: ListRowTrailingSectionSpacing.horizontal) {
|
||||
label()
|
||||
.frame(maxWidth: .infinity)
|
||||
|
||||
if details != nil || accessory != nil {
|
||||
ListRowTrailingSection(details,
|
||||
// Prevent multi selection to appear on the trailing side
|
||||
accessory: accessory?.kind.isMultiSelection == true ? nil : accessory)
|
||||
}
|
||||
}
|
||||
}
|
||||
.frame(maxHeight: .infinity)
|
||||
|
||||
@@ -23,6 +23,15 @@ public struct ListRowAccessory: View {
|
||||
case multiSelected
|
||||
/// An empty circle.
|
||||
case multiUnselected
|
||||
|
||||
var isMultiSelection: Bool {
|
||||
switch self {
|
||||
case .multiSelected, .multiUnselected:
|
||||
true
|
||||
default:
|
||||
false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// A chevron to indicate that the button pushes another screen.
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:56eeb69cb930a4a8768b9e965cb1b107d9e2d6e767284b20c720cbd026318977
|
||||
size 397819
|
||||
oid sha256:82772eb033bbbcd890f2fc4029430ba9436d9643535a73c4f368151149537edc
|
||||
size 398298
|
||||
|
||||
@@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b92722ff5a722dcf2f3815311d99149bf70ed8c146350a5ff83caab4ed63cb93
|
||||
size 266194
|
||||
oid sha256:de442478c2e805ffda381d0e309e16558dee99d6834fa76bd454138db0c1fb7a
|
||||
size 265583
|
||||
|
||||
Reference in New Issue
Block a user