mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-22 16:31:00 +00:00
Request store rating when publishing a post
This commit is contained in:
parent
41fdb3adde
commit
ab0b207596
2 changed files with 9 additions and 0 deletions
|
@ -49,6 +49,8 @@ public class UserPreferences: ObservableObject {
|
|||
@AppStorage("swipeactions-icon-style") public var swipeActionsIconStyle: SwipeActionsIconStyle = .iconWithText
|
||||
|
||||
@AppStorage("font_use_sf_rounded") public var useSFRoundedFont = false
|
||||
|
||||
@AppStorage("requested_review") public var requestedReview = false
|
||||
|
||||
public enum SwipeActionsIconStyle: String, CaseIterable {
|
||||
case iconWithText, iconOnly
|
||||
|
|
|
@ -9,8 +9,11 @@ import NukeUI
|
|||
import PhotosUI
|
||||
import SwiftUI
|
||||
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
|
||||
|
@ -195,6 +198,10 @@ public struct StatusEditorView: View {
|
|||
dismiss()
|
||||
NotificationCenter.default.post(name: NotificationsName.shareSheetClose,
|
||||
object: nil)
|
||||
if !viewModel.mode.isInShareExtension && !preferences.requestedReview {
|
||||
requestReview()
|
||||
preferences.requestedReview = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue