Skip to content

Commit

Permalink
Return the result of check()
Browse files Browse the repository at this point in the history
  • Loading branch information
kf99916 committed Dec 15, 2017
1 parent 943a2e1 commit 1b1d131
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions SwiftRater/SwiftRater.swift
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,14 @@ import StoreKit
UsageDataManager.shared.incrementSignificantUseCount()
}

public static func check() {
if UsageDataManager.shared.ratingConditionsHaveBeenMet {
SwiftRater.shared.showRatingAlert()
@discardableResult
public static func check() -> Bool {
guard UsageDataManager.shared.ratingConditionsHaveBeenMet else {
return false
}

SwiftRater.shared.showRatingAlert()
return true
}

public static func rateApp() {
Expand Down

0 comments on commit 1b1d131

Please sign in to comment.