Skip to content

Commit e9b1340

Browse files
committed
IOS-5072 removed vaultBackToRoots toggle
1 parent 1addf8c commit e9b1340

File tree

6 files changed

+8
-128
lines changed

6 files changed

+8
-128
lines changed

Anytype/Sources/PresentationLayer/Modules/SpaceHub/Subviews/SpaceCard/NewSpaceCardLabel.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import SwiftUI
22
import AnytypeCore
33

4-
// SpaceCardLabel and SpaceCard are splitted for better SwiftUI diff.
4+
// NewSpaceCardLabel and SpaceCard are splitted for better SwiftUI diff.
55
struct NewSpaceCardLabel: View {
66

77
let model: SpaceCardModel

Anytype/Sources/PresentationLayer/Modules/SpaceHub/Subviews/SpaceCard/SpaceCard.swift

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,14 @@ struct SpaceCard: View {
1313
let onTapSettings: () -> Void
1414
let onTapDelete: () -> Void
1515

16-
@State private var vaultBackToRootsToggle = FeatureFlags.vaultBackToRoots
17-
1816
var body: some View {
1917
Button {
2018
onTap()
2119
} label: {
22-
if !vaultBackToRootsToggle {
23-
SpaceCardLabel(
24-
model: model,
25-
draggedSpaceViewId: $draggedSpaceViewId
26-
)
27-
} else {
28-
NewSpaceCardLabel(
29-
model: model,
30-
draggedSpaceViewId: $draggedSpaceViewId
31-
)
32-
}
20+
NewSpaceCardLabel(
21+
model: model,
22+
draggedSpaceViewId: $draggedSpaceViewId
23+
)
3324
}
3425
.contentShape([.dragPreview, .contextMenuPreview], RoundedRectangle(cornerRadius: 20, style: .continuous))
3526
.contextMenu { menuItems.tint(Color.Text.primary) }

Anytype/Sources/PresentationLayer/Modules/SpaceHub/Subviews/SpaceCard/SpaceCardLabel.swift

Lines changed: 0 additions & 99 deletions
This file was deleted.

Anytype/Sources/PresentationLayer/Modules/SpaceHub/Subviews/SpaceHubList.swift

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ struct SpaceHubList: View {
88

99
@State private var draggedSpaceViewId: String?
1010
@State private var draggedInitialIndex: Int?
11-
@State private var vaultBackToRootsToggle = FeatureFlags.vaultBackToRoots
12-
11+
1312
var body: some View {
1413
if model.filteredSpaces.isEmpty && model.searchText.isEmpty {
1514
emptyStateView
@@ -22,7 +21,7 @@ struct SpaceHubList: View {
2221

2322
private var scrollView: some View {
2423
ScrollView {
25-
VStack(spacing: vaultBackToRootsToggle ? 8 : 0) {
24+
VStack(spacing: 8) {
2625
HomeUpdateSubmoduleView().padding(8)
2726

2827
ForEach(model.filteredSpaces) {
@@ -68,7 +67,7 @@ struct SpaceHubList: View {
6867
model.onDeleteSpace(spaceId: cardModel.targetSpaceId)
6968
}
7069
)
71-
.padding(.horizontal, vaultBackToRootsToggle ? 16 : 0)
70+
.padding(.horizontal, 16)
7271
.onDropIf(
7372
cardModel.isPinned,
7473
of: [.text],

Modules/AnytypeCore/AnytypeCore/Generated/FeatureFlags+Flags.swift

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
public extension FeatureFlags {
77

88
// Static value reader
9-
static var vaultBackToRoots: Bool {
10-
value(for: .vaultBackToRoots)
11-
}
12-
139
static var showAllButtonInWidgets: Bool {
1410
value(for: .showAllButtonInWidgets)
1511
}
@@ -108,7 +104,6 @@ public extension FeatureFlags {
108104

109105
// All toggles
110106
static let features: [FeatureDescription] = [
111-
.vaultBackToRoots,
112107
.showAllButtonInWidgets,
113108
.turnOffAutomaticWidgetOpening,
114109
.channelTypeSwitcher,

Modules/AnytypeCore/AnytypeCore/Utils/FeatureFlags/FeatureDescription+Flags.swift

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ import Foundation
44

55
public extension FeatureDescription {
66

7-
static let vaultBackToRoots = FeatureDescription(
8-
title: "New old design of vault cells",
9-
type: .feature(author: "vova@anytype.io", releaseVersion: "13"),
10-
defaultValue: true
11-
)
12-
137
static let showAllButtonInWidgets = FeatureDescription(
148
title: "See all as the last point in the widget - IOS-4945",
159
type: .feature(author: "m@anytype.io", releaseVersion: "13.5"),

0 commit comments

Comments
 (0)