rename showCreateLabelModal from showCreateEmailModal

This commit is contained in:
Satindar Dhillon 2022-06-27 15:41:09 -07:00
parent 5cfcb5ebb0
commit e2cb7a70a8
3 changed files with 7 additions and 7 deletions

View file

@ -42,7 +42,7 @@ struct ApplyLabelsView: View {
List {
Section {
Button(
action: { viewModel.showCreateEmailModal = true },
action: { viewModel.showCreateLabelModal = true },
label: {
HStack {
Image(systemName: "plus.circle.fill").foregroundColor(.green)
@ -102,7 +102,7 @@ struct ApplyLabelsView: View {
}
}
#endif
.sheet(isPresented: $viewModel.showCreateEmailModal) {
.sheet(isPresented: $viewModel.showCreateLabelModal) {
CreateLabelView(viewModel: viewModel)
}
}

View file

@ -46,7 +46,7 @@ struct LabelsView: View {
Group {
Section(footer: Text(footerText)) {
Button(
action: { viewModel.showCreateEmailModal = true },
action: { viewModel.showCreateLabelModal = true },
label: {
HStack {
Image(systemName: "plus.circle.fill").foregroundColor(.green)
@ -77,7 +77,7 @@ struct LabelsView: View {
}
}
.navigationTitle("Labels")
.sheet(isPresented: $viewModel.showCreateEmailModal) {
.sheet(isPresented: $viewModel.showCreateLabelModal) {
CreateLabelView(viewModel: viewModel)
}
}
@ -168,7 +168,7 @@ struct CreateLabelView: View {
var cancelCreateLabelButton: some View {
Button(
action: { viewModel.showCreateEmailModal = false },
action: { viewModel.showCreateLabelModal = false },
label: { Text("Cancel").foregroundColor(.appGrayTextContrast) }
)
}

View file

@ -8,7 +8,7 @@ import Views
@Published var selectedLabels = [LinkedItemLabel]()
@Published var unselectedLabels = [LinkedItemLabel]()
@Published var labels = [LinkedItemLabel]()
@Published var showCreateEmailModal = false
@Published var showCreateLabelModal = false
@Published var labelSearchFilter = ""
func loadLabels(
@ -53,7 +53,7 @@ import Views
}
isLoading = false
showCreateEmailModal = false
showCreateLabelModal = false
}
func deleteLabel(dataService: DataService, labelID: String, name: String) {