Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

Commit

Permalink
Fix #2584: No longer check clipboard if ref code exists on launch. (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jhreis authored May 27, 2020
1 parent 0c04ba1 commit fb96ea8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Client/Application/Delegates/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,13 @@ class AppDelegate: UIResponder, UIApplicationDelegate, UIViewControllerRestorati
}

if Preferences.URP.referralLookupOutstanding.value == true {
let refCode = UserReferralProgram.sanitize(input: UIPasteboard.general.string)
var refCode: String?

if Preferences.URP.referralCode.value == nil {
UrpLog.log("No ref code exists on launch, attempting clipboard retrieval")
refCode = UserReferralProgram.sanitize(input: UIPasteboard.general.string)
}

if refCode != nil {
UrpLog.log("Clipboard ref code found: " + (UIPasteboard.general.string ?? "!Clipboard Empty!"))
UrpLog.log("Clearing clipboard.")
Expand Down

0 comments on commit fb96ea8

Please sign in to comment.