Skip to content

Commit

Permalink
Fixed referral links not updating immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
leathalman committed May 28, 2022
1 parent 0f53f67 commit 9cf30a7
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
8 changes: 4 additions & 4 deletions Jotify.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -793,7 +793,7 @@
CODE_SIGN_ENTITLEMENTS = Jotify/Jotify.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 108;
CURRENT_PROJECT_VERSION = 110;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DEVELOPMENT_TEAM = G69P7XTUQ3;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
Expand All @@ -820,7 +820,7 @@
CODE_SIGN_ENTITLEMENTS = Jotify/Jotify.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 108;
CURRENT_PROJECT_VERSION = 110;
DEVELOPMENT_TEAM = G69P7XTUQ3;
"EXCLUDED_ARCHS[sdk=iphonesimulator*]" = arm64;
INFOPLIST_FILE = Jotify/Info.plist;
Expand Down Expand Up @@ -907,7 +907,7 @@
CODE_SIGN_ENTITLEMENTS = RecentNoteWidgetExtension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 108;
CURRENT_PROJECT_VERSION = 110;
DEVELOPMENT_TEAM = G69P7XTUQ3;
INFOPLIST_FILE = RecentNoteWidget/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
Expand All @@ -933,7 +933,7 @@
CODE_SIGN_ENTITLEMENTS = RecentNoteWidgetExtension.entitlements;
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
CURRENT_PROJECT_VERSION = 108;
CURRENT_PROJECT_VERSION = 110;
DEVELOPMENT_TEAM = G69P7XTUQ3;
INFOPLIST_FILE = RecentNoteWidget/Info.plist;
IPHONEOS_DEPLOYMENT_TARGET = 14.0;
Expand Down
Binary file not shown.
2 changes: 1 addition & 1 deletion Jotify/Controller/Settings/GeneralSettingsController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ class GeneralSettingsController: SettingsController, MFMailComposeViewController
composeVC.mailComposeDelegate = self
composeVC.setToRecipients(["hello@leathalenterprises.com"])
composeVC.setSubject("Jotify Support")
composeVC.setMessageBody("The following information is required for the best support experience. Please do not delete this. User ID: \(AuthManager().uid) \nVersion: \(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String) \nBuild: \(Bundle.main.infoDictionary?["CFBundleVersion"] as! String)", isHTML: false)
composeVC.setMessageBody("The following information is required for the best support experience. Please do not delete this. User ID: \(AuthManager().uid) \nVersion: \(Bundle.main.infoDictionary?["CFBundleShortVersionString"] as! String) \nBuild: \(Bundle.main.infoDictionary?["CFBundleVersion"] as! String)\n\n", isHTML: false)
self.present(composeVC, animated: true, completion: nil)
}

Expand Down
3 changes: 3 additions & 0 deletions Jotify/Model/Firebase/ReferralManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,13 @@ class ReferralManager {
return
}

User.settings?.referralLink = shortURL?.absoluteString ?? ""

DataManager.updateUserSettings(setting: "referralLink", value: shortURL?.absoluteString ?? "") { success in
if !success! {
print("Error creating and uploading referralLink to firestore")
}

}
}
}
Expand Down

0 comments on commit 9cf30a7

Please sign in to comment.