Simplified the if/else logic in the getter
This commit is contained in:
parent
6ddf0f29fb
commit
e7a04804b4
|
@ -29,11 +29,7 @@ final class SidebarExpandedContainers: ObservableObject {
|
||||||
|
|
||||||
subscript(_ containerID: ContainerIdentifier) -> Bool {
|
subscript(_ containerID: ContainerIdentifier) -> Bool {
|
||||||
get {
|
get {
|
||||||
if expandedTable.contains(containerID) {
|
return expandedTable.contains(containerID)
|
||||||
return true
|
|
||||||
} else {
|
|
||||||
return false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
set(newValue) {
|
set(newValue) {
|
||||||
if newValue {
|
if newValue {
|
||||||
|
|
Loading…
Reference in New Issue