New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix #2539: Super Referrer Improvements (Clipboard) #2535
Changes from 1 commit
7101d33
646e5bd
2359577
624dabc
15bfead
6fdb085
8214d99
285fe1e
aaa762e
3ce30ea
16d5037
576ae4a
834a1fc
98253b6
ade056f
17f0717
File filter...
Jump to…
Cleaned up code a bit, no functional changes.
- Loading branch information
| @@ -82,6 +82,8 @@ public class UserReferralProgram { | ||
| } | ||
|
|
||
| if let refCode = refCode { | ||
| // This is also potentially set after server network request, | ||
| // esp important for binaries that require server ref code retrieval. | ||
| Preferences.URP.referralCode.value = refCode | ||
|
This conversation was marked as resolved
by jhreis
jhreis
Author
Contributor
|
||
| } | ||
|
|
||
| @@ -194,11 +196,11 @@ public class UserReferralProgram { | ||
| public class func sanitize(input: String?) -> String? { | ||
| guard var input = input, input.hasPrefix(self.clipboardPrefix) else { return nil } | ||
|
|
||
| // +1 to strip off `:` that proceeds the defined prefix | ||
| input.removeFirst(self.clipboardPrefix.count + 1) | ||
|
This conversation was marked as resolved
by jhreis
kylehickinson
Contributor
|
||
| // Add any other potential validation here, e.g. validating the actual ref code string | ||
|
This conversation was marked as resolved
by jhreis
jumde
Collaborator
|
||
| if input.isEmpty { return nil } | ||
| return input | ||
| return input.isEmpty ? nil : input | ||
| } | ||
|
|
||
| /// Same as `customHeaders` only blocking on result, to gaurantee data is available | ||
This pref is not new right? Is this the only place we can set this?