Skip to content

Commit

Permalink
Make survey item view model public
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor Prüfer committed May 8, 2021
1 parent a0424a2 commit 6663167
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Binary file not shown.
6 changes: 3 additions & 3 deletions Sources/COFFEE/Views/SurveyView/SurveyView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ import SwiftUI
public struct SurveyView: View {

// View model for this survey session, also provided to the subviews as environment object
@StateObject var viewModel: ViewModel
@StateObject public var viewModel: ViewModel

var body: some View {
public var body: some View {
VStack(alignment: .leading, spacing: 6) {
// Progress indicator
ProgressView(value: Double(viewModel.currentSurveyItemIndex + 1), total: Double(viewModel.numberOfSurveyItems), label: {
Expand Down Expand Up @@ -54,7 +54,7 @@ public struct SurveyView: View {

extension SurveyView {

class ViewModel: ObservableObject {
public class ViewModel: ObservableObject {
// The survey to take
private let survey: Survey
// The responses to the survey items
Expand Down

0 comments on commit 6663167

Please sign in to comment.