iap warning view
This commit is contained in:
@@ -87,6 +87,7 @@
|
|||||||
1C658D7827C0744D003231EE /* PersistenceUPDATE.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C658D7627C0744D003231EE /* PersistenceUPDATE.swift */; };
|
1C658D7827C0744D003231EE /* PersistenceUPDATE.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C658D7627C0744D003231EE /* PersistenceUPDATE.swift */; };
|
||||||
1C683FCA2792281400745862 /* Stats.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C683FC92792281400745862 /* Stats.swift */; };
|
1C683FCA2792281400745862 /* Stats.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C683FC92792281400745862 /* Stats.swift */; };
|
||||||
1C683FCB2792281400745862 /* Stats.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C683FC92792281400745862 /* Stats.swift */; };
|
1C683FCB2792281400745862 /* Stats.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C683FC92792281400745862 /* Stats.swift */; };
|
||||||
|
1C6EA85A2946F1A300C7D332 /* IAPWarningView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C6EA8592946F1A300C7D332 /* IAPWarningView.swift */; };
|
||||||
1C718C7027F611C900A8F9FE /* DaysFilterClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C718C6F27F611C900A8F9FE /* DaysFilterClass.swift */; };
|
1C718C7027F611C900A8F9FE /* DaysFilterClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C718C6F27F611C900A8F9FE /* DaysFilterClass.swift */; };
|
||||||
1C718C7127F611C900A8F9FE /* DaysFilterClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C718C6F27F611C900A8F9FE /* DaysFilterClass.swift */; };
|
1C718C7127F611C900A8F9FE /* DaysFilterClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C718C6F27F611C900A8F9FE /* DaysFilterClass.swift */; };
|
||||||
1C718C7327F611E300A8F9FE /* StupidAssCustomWidgetObservableObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C718C7227F611E300A8F9FE /* StupidAssCustomWidgetObservableObject.swift */; };
|
1C718C7327F611E300A8F9FE /* StupidAssCustomWidgetObservableObject.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C718C7227F611E300A8F9FE /* StupidAssCustomWidgetObservableObject.swift */; };
|
||||||
@@ -257,6 +258,7 @@
|
|||||||
1C5F4977279C945E0092F1B4 /* UserDefaultsStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaultsStore.swift; sourceTree = "<group>"; };
|
1C5F4977279C945E0092F1B4 /* UserDefaultsStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UserDefaultsStore.swift; sourceTree = "<group>"; };
|
||||||
1C658D7627C0744D003231EE /* PersistenceUPDATE.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersistenceUPDATE.swift; sourceTree = "<group>"; };
|
1C658D7627C0744D003231EE /* PersistenceUPDATE.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersistenceUPDATE.swift; sourceTree = "<group>"; };
|
||||||
1C683FC92792281400745862 /* Stats.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Stats.swift; sourceTree = "<group>"; };
|
1C683FC92792281400745862 /* Stats.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Stats.swift; sourceTree = "<group>"; };
|
||||||
|
1C6EA8592946F1A300C7D332 /* IAPWarningView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = IAPWarningView.swift; sourceTree = "<group>"; };
|
||||||
1C718C6F27F611C900A8F9FE /* DaysFilterClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DaysFilterClass.swift; sourceTree = "<group>"; };
|
1C718C6F27F611C900A8F9FE /* DaysFilterClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DaysFilterClass.swift; sourceTree = "<group>"; };
|
||||||
1C718C7227F611E300A8F9FE /* StupidAssCustomWidgetObservableObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StupidAssCustomWidgetObservableObject.swift; sourceTree = "<group>"; };
|
1C718C7227F611E300A8F9FE /* StupidAssCustomWidgetObservableObject.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = StupidAssCustomWidgetObservableObject.swift; sourceTree = "<group>"; };
|
||||||
1C7352B827DD02760024B5D2 /* ImagePickerGridView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImagePickerGridView.swift; sourceTree = "<group>"; };
|
1C7352B827DD02760024B5D2 /* ImagePickerGridView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImagePickerGridView.swift; sourceTree = "<group>"; };
|
||||||
@@ -538,6 +540,7 @@
|
|||||||
1C361F0B27C0356B00E832FC /* MainTabView.swift */,
|
1C361F0B27C0356B00E832FC /* MainTabView.swift */,
|
||||||
1C4DAA7327CC263F00C25D2B /* MonthView */,
|
1C4DAA7327CC263F00C25D2B /* MonthView */,
|
||||||
1CB4D09B2877A36400902A56 /* PurchaseButtonView.swift */,
|
1CB4D09B2877A36400902A56 /* PurchaseButtonView.swift */,
|
||||||
|
1C6EA8592946F1A300C7D332 /* IAPWarningView.swift */,
|
||||||
1C1B6E6827FD4E8F00181E70 /* SampleEntryView.swift */,
|
1C1B6E6827FD4E8F00181E70 /* SampleEntryView.swift */,
|
||||||
1C04489327C2CABF00D22444 /* SettingsView */,
|
1C04489327C2CABF00D22444 /* SettingsView */,
|
||||||
1C04489527C2CB1A00D22444 /* Sharing */,
|
1C04489527C2CB1A00D22444 /* Sharing */,
|
||||||
@@ -918,6 +921,7 @@
|
|||||||
1C5F4976279C84090092F1B4 /* OnboardingData.swift in Sources */,
|
1C5F4976279C84090092F1B4 /* OnboardingData.swift in Sources */,
|
||||||
1CAD603427A5C1C800C520BD /* SmallRollUpHeaderView.swift in Sources */,
|
1CAD603427A5C1C800C520BD /* SmallRollUpHeaderView.swift in Sources */,
|
||||||
1CAD603A27A5C1C800C520BD /* BGView.swift in Sources */,
|
1CAD603A27A5C1C800C520BD /* BGView.swift in Sources */,
|
||||||
|
1C6EA85A2946F1A300C7D332 /* IAPWarningView.swift in Sources */,
|
||||||
1C26190727960DC900FDC148 /* ChartViewItemBuildable.swift in Sources */,
|
1C26190727960DC900FDC148 /* ChartViewItemBuildable.swift in Sources */,
|
||||||
1CD90B5D278C7EAD001C4FEA /* Random.swift in Sources */,
|
1CD90B5D278C7EAD001C4FEA /* Random.swift in Sources */,
|
||||||
1C2618FE27960A4F00FDC148 /* YearViewModel.swift in Sources */,
|
1C2618FE27960A4F00FDC148 /* YearViewModel.swift in Sources */,
|
||||||
|
|||||||
@@ -24,12 +24,14 @@ struct FeelsApp: App {
|
|||||||
BGTask.runFillInMissingDatesTask(task: task as! BGProcessingTask)
|
BGTask.runFillInMissingDatesTask(task: task as! BGProcessingTask)
|
||||||
}
|
}
|
||||||
UIApplication.shared.applicationIconBadgeNumber = 0
|
UIApplication.shared.applicationIconBadgeNumber = 0
|
||||||
|
// PersistenceController.shared.clearDB()
|
||||||
|
PersistenceController.shared.populateMemory()
|
||||||
}
|
}
|
||||||
|
|
||||||
var body: some Scene {
|
var body: some Scene {
|
||||||
WindowGroup {
|
WindowGroup {
|
||||||
// build these here so when tints and other things get updated the views / their data dont
|
// build these here so when tints and other things get updated the views / their data dont
|
||||||
// have to get redrawn
|
// have to get redrawn#imageLiteral(resourceName: "simulator_screenshot_0017B4DC-100B-42A3-A406-9019704AE275.png")
|
||||||
MainTabView(dayView: DayView(viewModel: DayViewViewModel(addMonthStartWeekdayPadding: false)),
|
MainTabView(dayView: DayView(viewModel: DayViewViewModel(addMonthStartWeekdayPadding: false)),
|
||||||
monthView: MonthView(viewModel: DayViewViewModel(addMonthStartWeekdayPadding: true)),
|
monthView: MonthView(viewModel: DayViewViewModel(addMonthStartWeekdayPadding: true)),
|
||||||
yearView: YearView(viewModel: YearViewModel()),
|
yearView: YearView(viewModel: YearViewModel()),
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ public enum StoreError: Error {
|
|||||||
|
|
||||||
class IAPManager: ObservableObject {
|
class IAPManager: ObservableObject {
|
||||||
@Published private(set) var showIAP = false
|
@Published private(set) var showIAP = false
|
||||||
|
@Published private(set) var showIAPWarning = false
|
||||||
@Published private(set) var subscriptions = [Product: (status: [Product.SubscriptionInfo.Status], renewalInfo: RenewalInfo)?]()
|
@Published private(set) var subscriptions = [Product: (status: [Product.SubscriptionInfo.Status], renewalInfo: RenewalInfo)?]()
|
||||||
@AppStorage(UserDefaultsStore.Keys.firstLaunchDate.rawValue, store: GroupUserDefaults.groupDefaults) private var firstLaunchDate = Date()
|
@AppStorage(UserDefaultsStore.Keys.firstLaunchDate.rawValue, store: GroupUserDefaults.groupDefaults) private var firstLaunchDate = Date()
|
||||||
|
|
||||||
@@ -112,6 +113,7 @@ class IAPManager: ObservableObject {
|
|||||||
if let expireDate = expireDate {
|
if let expireDate = expireDate {
|
||||||
expireOnTimer = Timer.init(fire: expireDate, interval: 0, repeats: false, block: { _ in
|
expireOnTimer = Timer.init(fire: expireDate, interval: 0, repeats: false, block: { _ in
|
||||||
self.decideShowIAP()
|
self.decideShowIAP()
|
||||||
|
self.decideShowIAPWarning()
|
||||||
})
|
})
|
||||||
RunLoop.main.add(expireOnTimer!, forMode: .common)
|
RunLoop.main.add(expireOnTimer!, forMode: .common)
|
||||||
} else {
|
} else {
|
||||||
@@ -130,6 +132,7 @@ class IAPManager: ObservableObject {
|
|||||||
await updateCustomerProductStatus()
|
await updateCustomerProductStatus()
|
||||||
|
|
||||||
decideShowIAP()
|
decideShowIAP()
|
||||||
|
decideShowIAPWarning()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -158,6 +161,16 @@ class IAPManager: ObservableObject {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func decideShowIAPWarning() {
|
||||||
|
DispatchQueue.main.async {
|
||||||
|
if self.currentSubscription != nil {
|
||||||
|
self.showIAPWarning = false
|
||||||
|
} else {
|
||||||
|
self.showIAPWarning = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func listenForTransactions() -> Task<Void, Error> {
|
func listenForTransactions() -> Task<Void, Error> {
|
||||||
return Task.detached {
|
return Task.detached {
|
||||||
//Iterate through any transactions that don't come from a direct call to `purchase()`.
|
//Iterate through any transactions that don't come from a direct call to `purchase()`.
|
||||||
@@ -243,6 +256,7 @@ class IAPManager: ObservableObject {
|
|||||||
print("purchasedSubscriptions \(purchasedSubscriptions)")
|
print("purchasedSubscriptions \(purchasedSubscriptions)")
|
||||||
if !purchasedSubscriptions.isEmpty {
|
if !purchasedSubscriptions.isEmpty {
|
||||||
self.showIAP = false
|
self.showIAP = false
|
||||||
|
self.showIAPWarning = false
|
||||||
}
|
}
|
||||||
|
|
||||||
for sub in purchasedSubscriptions {
|
for sub in purchasedSubscriptions {
|
||||||
@@ -280,6 +294,7 @@ class IAPManager: ObservableObject {
|
|||||||
await transaction.finish()
|
await transaction.finish()
|
||||||
|
|
||||||
decideShowIAP()
|
decideShowIAP()
|
||||||
|
decideShowIAPWarning()
|
||||||
|
|
||||||
return transaction
|
return transaction
|
||||||
case .userCancelled, .pending:
|
case .userCancelled, .pending:
|
||||||
|
|||||||
@@ -26,10 +26,13 @@ extension PersistenceController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func populateMemory() {
|
func populateMemory() {
|
||||||
for idx in 1..<25 {
|
for idx in 1..<255 {
|
||||||
let newItem = MoodEntry(context: viewContext)
|
let newItem = MoodEntry(context: viewContext)
|
||||||
newItem.timestamp = Calendar.current.date(byAdding: .day, value: -idx, to: Date())
|
newItem.timestamp = Calendar.current.date(byAdding: .day, value: -idx, to: Date())
|
||||||
newItem.moodValue = Int16(Mood.allValues.randomElement()!.rawValue)
|
newItem.moodValue = Int16.random(in: 2 ... 4)
|
||||||
|
if idx % 5 == 0 {
|
||||||
|
newItem.moodValue = Int16.random(in: 0 ... 4)
|
||||||
|
}
|
||||||
newItem.canEdit = true
|
newItem.canEdit = true
|
||||||
newItem.canDelete = true
|
newItem.canDelete = true
|
||||||
|
|
||||||
|
|||||||
@@ -80,13 +80,6 @@ struct DayView: View {
|
|||||||
showUpdateEntryAlert = false
|
showUpdateEntryAlert = false
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if iapManager.showIAP {
|
|
||||||
VStack {
|
|
||||||
Spacer()
|
|
||||||
PurchaseButtonView(height: 175, iapManager: iapManager)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.onAppear{
|
.onAppear{
|
||||||
iapManager.decideShowIAP()
|
iapManager.decideShowIAP()
|
||||||
@@ -173,7 +166,6 @@ struct DayView: View {
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
.disabled(iapManager.showIAP)
|
|
||||||
.background(
|
.background(
|
||||||
theme.currentTheme.secondaryBGColor
|
theme.currentTheme.secondaryBGColor
|
||||||
)
|
)
|
||||||
|
|||||||
62
Shared/views/IAPWarningView.swift
Normal file
62
Shared/views/IAPWarningView.swift
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
//
|
||||||
|
// PurchaseButtonView.swift
|
||||||
|
// Feels
|
||||||
|
//
|
||||||
|
// Created by Trey Tartt on 7/7/22.
|
||||||
|
//
|
||||||
|
|
||||||
|
import SwiftUI
|
||||||
|
import StoreKit
|
||||||
|
|
||||||
|
struct IAPWarningView: View {
|
||||||
|
@AppStorage(UserDefaultsStore.Keys.theme.rawValue, store: GroupUserDefaults.groupDefaults) private var theme: Theme = .system
|
||||||
|
@AppStorage(UserDefaultsStore.Keys.textColor.rawValue, store: GroupUserDefaults.groupDefaults) private var textColor: Color = DefaultTextColor.textColor
|
||||||
|
@AppStorage(UserDefaultsStore.Keys.firstLaunchDate.rawValue, store: GroupUserDefaults.groupDefaults) private var firstLaunchDate = Date()
|
||||||
|
|
||||||
|
var iapManager: IAPManager
|
||||||
|
|
||||||
|
private let height: Float
|
||||||
|
private let showManageSubClosure: (() -> Void)?
|
||||||
|
@State private var showSettings = false
|
||||||
|
|
||||||
|
public init(height: Float, iapManager: IAPManager, showManageSubClosure: (() -> Void)? = nil, showCountdownTimer: Bool = false) {
|
||||||
|
self.height = height
|
||||||
|
self.showManageSubClosure = showManageSubClosure
|
||||||
|
self.iapManager = iapManager
|
||||||
|
}
|
||||||
|
|
||||||
|
var body: some View {
|
||||||
|
VStack {
|
||||||
|
Text(String(format: String(localized: "iap_warning_view_title"), iapManager.daysLeftBeforeIAP))
|
||||||
|
.font(.body)
|
||||||
|
.frame(minWidth: 0, maxWidth: .infinity)
|
||||||
|
.background(theme.currentTheme.secondaryBGColor)
|
||||||
|
|
||||||
|
Button(action: {
|
||||||
|
showSettings.toggle()
|
||||||
|
}, label: {
|
||||||
|
Text(String(localized: "iap_warning_view_buy_button"))
|
||||||
|
.foregroundColor(.white)
|
||||||
|
.bold()
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.contentShape(Rectangle())
|
||||||
|
})
|
||||||
|
.frame(maxWidth: .infinity)
|
||||||
|
.frame(height: 50)
|
||||||
|
.background(RoundedRectangle(cornerRadius: 10).fill(DefaultMoodTint.color(forMood: .great)))
|
||||||
|
}
|
||||||
|
// .frame(height: CGFloat(height))
|
||||||
|
.frame(minWidth: 0, maxWidth: .infinity)
|
||||||
|
.padding()
|
||||||
|
.background(theme.currentTheme.secondaryBGColor)
|
||||||
|
.sheet(isPresented: $showSettings) {
|
||||||
|
SettingsView()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
struct IAPWarningView_Previews: PreviewProvider {
|
||||||
|
static var previews: some View {
|
||||||
|
IAPWarningView(height: 175, iapManager: IAPManager())
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -44,6 +44,7 @@ struct MonthView: View {
|
|||||||
]
|
]
|
||||||
|
|
||||||
@ObservedObject var viewModel: DayViewViewModel
|
@ObservedObject var viewModel: DayViewViewModel
|
||||||
|
@State private var iAPWarningViewHidden = false
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
ZStack {
|
ZStack {
|
||||||
@@ -72,6 +73,12 @@ struct MonthView: View {
|
|||||||
)
|
)
|
||||||
}
|
}
|
||||||
.padding([.leading, .trailing])
|
.padding([.leading, .trailing])
|
||||||
|
.background(
|
||||||
|
GeometryReader { proxy in
|
||||||
|
let offset = proxy.frame(in: .named("scroll")).minY
|
||||||
|
Color.clear.preference(key: ViewOffsetKey.self, value: offset)
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
.disabled(iapManager.showIAP)
|
.disabled(iapManager.showIAP)
|
||||||
}
|
}
|
||||||
@@ -81,6 +88,13 @@ struct MonthView: View {
|
|||||||
Spacer()
|
Spacer()
|
||||||
PurchaseButtonView(height: 175, iapManager: iapManager)
|
PurchaseButtonView(height: 175, iapManager: iapManager)
|
||||||
}
|
}
|
||||||
|
} else if iapManager.showIAPWarning {
|
||||||
|
VStack {
|
||||||
|
Spacer()
|
||||||
|
if !iAPWarningViewHidden {
|
||||||
|
IAPWarningView(height: 75, iapManager: iapManager)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onAppear(perform: {
|
.onAppear(perform: {
|
||||||
@@ -101,6 +115,10 @@ struct MonthView: View {
|
|||||||
ShareSheet(photo: uiImage)
|
ShareSheet(photo: uiImage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.onPreferenceChange(ViewOffsetKey.self) { value in
|
||||||
|
print(value)
|
||||||
|
iAPWarningViewHidden = value < 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -230,7 +248,7 @@ extension MonthView {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
struct HomeViewTwo_Previews: PreviewProvider {
|
struct MonthView_Previews: PreviewProvider {
|
||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
MonthView(viewModel: DayViewViewModel(addMonthStartWeekdayPadding: true))
|
MonthView(viewModel: DayViewViewModel(addMonthStartWeekdayPadding: true))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ struct YearView: View {
|
|||||||
@EnvironmentObject var iapManager: IAPManager
|
@EnvironmentObject var iapManager: IAPManager
|
||||||
@StateObject public var viewModel: YearViewModel
|
@StateObject public var viewModel: YearViewModel
|
||||||
@StateObject private var filteredDays = DaysFilterClass.shared
|
@StateObject private var filteredDays = DaysFilterClass.shared
|
||||||
|
@State private var iAPWarningViewHidden = false
|
||||||
//[
|
//[
|
||||||
// 2001: [0: [], 1: [], 2: []],
|
// 2001: [0: [], 1: [], 2: []],
|
||||||
// 2002: [0: [], 1: [], 2: []]
|
// 2002: [0: [], 1: [], 2: []]
|
||||||
@@ -62,6 +63,13 @@ struct YearView: View {
|
|||||||
Spacer()
|
Spacer()
|
||||||
PurchaseButtonView(height: 175, iapManager: iapManager)
|
PurchaseButtonView(height: 175, iapManager: iapManager)
|
||||||
}
|
}
|
||||||
|
} else if iapManager.showIAPWarning {
|
||||||
|
VStack {
|
||||||
|
Spacer()
|
||||||
|
if !iAPWarningViewHidden {
|
||||||
|
IAPWarningView(height: 75, iapManager: iapManager)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.onAppear(perform: {
|
.onAppear(perform: {
|
||||||
@@ -72,6 +80,10 @@ struct YearView: View {
|
|||||||
theme.currentTheme.bg
|
theme.currentTheme.bg
|
||||||
.edgesIgnoringSafeArea(.all)
|
.edgesIgnoringSafeArea(.all)
|
||||||
)
|
)
|
||||||
|
.onPreferenceChange(ViewOffsetKey.self) { value in
|
||||||
|
print(value)
|
||||||
|
iAPWarningViewHidden = value < 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private var monthsHeader: some View {
|
private var monthsHeader: some View {
|
||||||
@@ -135,6 +147,12 @@ struct YearView: View {
|
|||||||
.cornerRadius(10)
|
.cornerRadius(10)
|
||||||
}
|
}
|
||||||
.padding([.top, .leading, .trailing])
|
.padding([.top, .leading, .trailing])
|
||||||
|
.background(
|
||||||
|
GeometryReader { proxy in
|
||||||
|
let offset = proxy.frame(in: .named("scroll")).minY
|
||||||
|
Color.clear.preference(key: ViewOffsetKey.self, value: offset)
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,8 @@
|
|||||||
"purchase_view_current_subscription_expires_in" = "Trial expires in:";
|
"purchase_view_current_subscription_expires_in" = "Trial expires in:";
|
||||||
"purchase_view_current_subscription_expired_on" = "Trial expired on:";
|
"purchase_view_current_subscription_expired_on" = "Trial expired on:";
|
||||||
|
|
||||||
|
"iap_warning_view_title" = "In %d day(s) this view will no longer scroll";
|
||||||
|
"iap_warning_view_buy_button" = "Subscribe Now";
|
||||||
/* not used */
|
/* not used */
|
||||||
"onboarding_title_title" = "What would you like the reminder to say?";
|
"onboarding_title_title" = "What would you like the reminder to say?";
|
||||||
"onboarding_title_type_your_own" = "-- or type your own--";
|
"onboarding_title_type_your_own" = "-- or type your own--";
|
||||||
|
|||||||
Reference in New Issue
Block a user