Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vishnuravi committed Nov 2, 2024
1 parent e49e246 commit 33a21e6
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
8 changes: 4 additions & 4 deletions LifeSpace.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
634FFF672C169F40005E8217 /* LifeSpaceConsent.swift in Sources */ = {isa = PBXBuildFile; fileRef = 634FFF662C169F40005E8217 /* LifeSpaceConsent.swift */; };
634FFF6D2C16B81A005E8217 /* HIPAAAuthorization.swift in Sources */ = {isa = PBXBuildFile; fileRef = 634FFF6C2C16B81A005E8217 /* HIPAAAuthorization.swift */; };
635198792CD53FF40087B1F3 /* FirebaseConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 635198782CD53FF10087B1F3 /* FirebaseConfiguration.swift */; };
639B69DB2C2BCD6A00C0FF4A /* ConsentPDFVIewer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 639B69DA2C2BCD6A00C0FF4A /* ConsentPDFVIewer.swift */; };
639B69DB2C2BCD6A00C0FF4A /* ConsentPDFViewer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 639B69DA2C2BCD6A00C0FF4A /* ConsentPDFViewer.swift */; };
63A28D312C0580310025A1E0 /* RefreshIcon.swift in Sources */ = {isa = PBXBuildFile; fileRef = 63A28D302C0580310025A1E0 /* RefreshIcon.swift */; };
63A28D332C062E2E0025A1E0 /* GoogleService-Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 63A28D322C062E2E0025A1E0 /* GoogleService-Info.plist */; };
63A8DB292C1FE81200939757 /* AppIcon.png in Resources */ = {isa = PBXBuildFile; fileRef = 63A8DB282C1FE81200939757 /* AppIcon.png */; };
Expand Down Expand Up @@ -140,7 +140,7 @@
634FFF662C169F40005E8217 /* LifeSpaceConsent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LifeSpaceConsent.swift; sourceTree = "<group>"; };
634FFF6C2C16B81A005E8217 /* HIPAAAuthorization.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HIPAAAuthorization.swift; sourceTree = "<group>"; };
635198782CD53FF10087B1F3 /* FirebaseConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FirebaseConfiguration.swift; sourceTree = "<group>"; };
639B69DA2C2BCD6A00C0FF4A /* ConsentPDFVIewer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsentPDFVIewer.swift; sourceTree = "<group>"; };
639B69DA2C2BCD6A00C0FF4A /* ConsentPDFViewer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConsentPDFViewer.swift; sourceTree = "<group>"; };
63A28D302C0580310025A1E0 /* RefreshIcon.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RefreshIcon.swift; sourceTree = "<group>"; };
63A28D322C062E2E0025A1E0 /* GoogleService-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "GoogleService-Info.plist"; sourceTree = "<group>"; };
63A8DB282C1FE81200939757 /* AppIcon.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = AppIcon.png; sourceTree = "<group>"; };
Expand Down Expand Up @@ -404,7 +404,7 @@
A9FE7ACF2AA39BAB0077B045 /* AccountSheet.swift */,
A9720E422ABB68CC00872D23 /* AccountSetupHeader.swift */,
A9DFE8A82ABE551400428242 /* AccountButton.swift */,
639B69DA2C2BCD6A00C0FF4A /* ConsentPDFVIewer.swift */,
639B69DA2C2BCD6A00C0FF4A /* ConsentPDFViewer.swift */,
63D86AD52C3B7F310096B9DB /* DocumentWebView.swift */,
630D3B562C616E9D006066E5 /* WithdrawView.swift */,
);
Expand Down Expand Up @@ -638,7 +638,7 @@
2FE5DC3529EDD7CA004B9AB4 /* Consent.swift in Sources */,
630D3B572C616E9D006066E5 /* WithdrawView.swift in Sources */,
63EA5F8C2BC78F8400A48590 /* DailySurveyResponse.swift in Sources */,
639B69DB2C2BCD6A00C0FF4A /* ConsentPDFVIewer.swift in Sources */,
639B69DB2C2BCD6A00C0FF4A /* ConsentPDFViewer.swift in Sources */,
2FE5DC4529EDD7F2004B9AB4 /* Binding+Negate.swift in Sources */,
63497B732BBF855E001F8419 /* OptionsPanel.swift in Sources */,
63D86AD62C3B7F310096B9DB /* DocumentWebView.swift in Sources */,
Expand Down
File renamed without changes.
14 changes: 7 additions & 7 deletions LifeSpace/Account/WithdrawView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ struct WithdrawView: View {
Spacer()

Button(action: {
// Send user back to onboarding flow
/// Send user back to onboarding flow
completedOnboardingFlow = false
}, label: {
Text("CLOSE")
Expand All @@ -77,25 +77,25 @@ struct WithdrawView: View {
}

private func processWithdrawal() async {
// Stop location tracking
/// Stop location tracking
locationModule.stopTracking()
UserDefaults.standard.set(false, forKey: StorageKeys.trackingPreference)

// Clear the user's study ID
/// Clear the user's study ID
studyID = ""

// Sign out the user
/// Sign out the user
do {
try Auth.auth().signOut()
} catch {
errorMessage = error.localizedDescription
self.showingAlert = true
}

// Remove the user's account
await account.removeUserDetails()
/// Remove the user's account
account.removeUserDetails()

// Instruct the user to delete the app
/// Instruct the user to delete the app
self.showingDeleteSheet = true
}
}
Expand Down
6 changes: 3 additions & 3 deletions LifeSpace/Survey/SurveyModule.swift
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,18 @@ enum SurveyModule {
static var surveyAlreadyTaken: Bool {
let lastSurveyDateString = UserDefaults.standard.string(forKey: StorageKeys.lastSurveyDate)

// Determine the survey date based on the current time
/// Determine the survey date based on the current time
let surveyDate: Date
if currentHour < 7 {
surveyDate = Calendar.current.date(byAdding: .day, value: -1, to: Date())?.startOfDay ?? Date().startOfDay
} else {
surveyDate = Date().startOfDay
}

// Format the survey date to a string
/// Format the survey date to a string
let surveyDateString = dateFormatter.string(from: surveyDate)

// Compare the last survey date with the calculated survey date
/// Compare the last survey date with the calculated survey date
return lastSurveyDateString == surveyDateString
}

Expand Down

0 comments on commit 33a21e6

Please sign in to comment.