mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-26 02:01:02 +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("swipeactions-icon-style") public var swipeActionsIconStyle: SwipeActionsIconStyle = .iconWithText
|
||||||
|
|
||||||
@AppStorage("font_use_sf_rounded") public var useSFRoundedFont = false
|
@AppStorage("font_use_sf_rounded") public var useSFRoundedFont = false
|
||||||
|
|
||||||
|
@AppStorage("requested_review") public var requestedReview = false
|
||||||
|
|
||||||
public enum SwipeActionsIconStyle: String, CaseIterable {
|
public enum SwipeActionsIconStyle: String, CaseIterable {
|
||||||
case iconWithText, iconOnly
|
case iconWithText, iconOnly
|
||||||
|
|
|
@ -9,8 +9,11 @@ import NukeUI
|
||||||
import PhotosUI
|
import PhotosUI
|
||||||
import SwiftUI
|
import SwiftUI
|
||||||
import UIKit
|
import UIKit
|
||||||
|
import StoreKit
|
||||||
|
|
||||||
public struct StatusEditorView: View {
|
public struct StatusEditorView: View {
|
||||||
|
@Environment(\.requestReview) var requestReview
|
||||||
|
|
||||||
@EnvironmentObject private var preferences: UserPreferences
|
@EnvironmentObject private var preferences: UserPreferences
|
||||||
@EnvironmentObject private var theme: Theme
|
@EnvironmentObject private var theme: Theme
|
||||||
@EnvironmentObject private var client: Client
|
@EnvironmentObject private var client: Client
|
||||||
|
@ -195,6 +198,10 @@ public struct StatusEditorView: View {
|
||||||
dismiss()
|
dismiss()
|
||||||
NotificationCenter.default.post(name: NotificationsName.shareSheetClose,
|
NotificationCenter.default.post(name: NotificationsName.shareSheetClose,
|
||||||
object: nil)
|
object: nil)
|
||||||
|
if !viewModel.mode.isInShareExtension && !preferences.requestedReview {
|
||||||
|
requestReview()
|
||||||
|
preferences.requestedReview = true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue