-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider making the configuration, initialPopupData and reEnablePopupData public. #118
Comments
Hi @VincentSit,
so you can instantiate it only passing the About the Thanks for using the library! |
Hi @ennioma , thanks for response. I just noticed that three parameters in init are optional, I can totally omit them. What a stupid mistake. so now I don't have any problems. BTW, I think you add default value to those parameters is good. |
Hi @ennioma , If I ignore the remaining two parameters, they will not be created automatically, you can see the call stack. I think this call stack may not meet the expectations of the code design, public init(configuration: ArekConfiguration? = nil,
initialPopupData: ArekPopupData? = nil,
reEnablePopupData: ArekPopupData? = nil) {
self.configuration = configuration ?? self.configuration
self.initialPopupData = initialPopupData ?? self.initialPopupData
self.reEnablePopupData = reEnablePopupData ?? self.reEnablePopupData
} |
I think the stack is correct because the function signature is |
Hi @ennioma , let configuration = ArekConfiguration(frequency: .OnceAWeek, presentInitialPopup: true, presentReEnablePopup: true)
let arek = ArekNotifications(configuration: configuration)
arek.manage { Log.info("APNs permission is \($0)") } |
Hi, thanks for sharing this library.
I have a question. I just want to change the frequency property of the configuration, but write a lot of unnecessary duplicate code. It doesn't seem elegant enough.
The
ArekLocalizationManager
is also not public, so it is not possible to construct data using it.I wonder if we can make them public so that we can easily change the values.
The text was updated successfully, but these errors were encountered: