Skip to content

Commit

Permalink
-normalize
Browse files Browse the repository at this point in the history
  • Loading branch information
aprius committed Sep 24, 2023
1 parent 41620d9 commit e7d55f5
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions Modules/Rate/AppRatingComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public class AppRatingComponent : GameComponent

protected override void OnEnabled()
{
#if UNITY_ANDROID && !UNITY_EDITOR
#if UNITY_ANDROID
initReviewEvent.OnRaised += OnInitReview;
#endif
reviewEvent.OnRaised += OnReview;
Expand All @@ -33,24 +33,26 @@ protected override void OnEnabled()
private void OnReview()
{
if (!Application.isMobilePlatform) return;

#if UNITY_IOS
Device.RequestStoreReview();
#elif UNITY_ANDROID && PANCAKE_REVIEW

#if UNITY_ANDROID && PANCAKE_REVIEW
StartCoroutine(LaunchReview());
#elif UNITY_IOS
Device.RequestStoreReview();
#endif
}

private void OnInitReview()
{
#if PANCAKE_REVIEW && !UNITY_EDITOR
if (!Application.isMobilePlatform) return;

#if UNITY_ANDROID && PANCAKE_REVIEW
_coroutine = StartCoroutine(InitReview());
#endif
}

protected override void OnDisabled()
{
#if UNITY_ANDROID && !UNITY_EDITOR
#if UNITY_ANDROID
initReviewEvent.OnRaised -= OnInitReview;
#endif
reviewEvent.OnRaised -= OnReview;
Expand Down

0 comments on commit e7d55f5

Please sign in to comment.