mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-22 08:20:59 +00:00
Fix requestReview crash on macOS
This commit is contained in:
parent
f1919305ab
commit
ef7d75d3d5
1 changed files with 3 additions and 3 deletions
|
@ -12,8 +12,6 @@ import UIKit
|
|||
import StoreKit
|
||||
|
||||
public struct StatusEditorView: View {
|
||||
@Environment(\.requestReview) var requestReview
|
||||
|
||||
@EnvironmentObject private var preferences: UserPreferences
|
||||
@EnvironmentObject private var theme: Theme
|
||||
@EnvironmentObject private var client: Client
|
||||
|
@ -199,7 +197,9 @@ public struct StatusEditorView: View {
|
|||
NotificationCenter.default.post(name: NotificationsName.shareSheetClose,
|
||||
object: nil)
|
||||
if !viewModel.mode.isInShareExtension && !preferences.requestedReview {
|
||||
requestReview()
|
||||
if let scene = UIApplication.shared.connectedScenes.first(where: { $0.activationState == .foregroundActive }) as? UIWindowScene {
|
||||
SKStoreReviewController.requestReview(in: scene)
|
||||
}
|
||||
preferences.requestedReview = true
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue