You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I almost wanted to implement the Once library (https://github.com/jonfinerty/Once) until I found your library. The Once has a feature I'd really like to see in Only and that is repeating a task every X times. There can be multiple variants for this feature.
Variant 1) perform action on the first time (when action has never been performed) and after X times
Variant 2) perform action after X times
Variant 3) perform action after X times and keep redoing this for Y times or an infinite amount of times
Examples:
Ask user to rate app after opening the app 10 times, keep asking again after 10 times until the user has rated the app
Notify user about new feature on the app launch and remind them every 10 app startups 2 times (meaning this action is done after 20 app startups)
Keep reminding the user about something every X times for-ever
I hope you can consider this functionality and for starters just implement the basic one (variant 1 or 2)
The text was updated successfully, but these errors were encountered:
@zunjae
Hi, I thought about your multiple variants feature related to repeating a task every X times.
I implemented onLastDo, onBeforeDonefeatures for pre and post-processing on version 1.0.2.
So I think here is the new solution to resolve Variant 1)
only("rating", times =10) {
onLastDo { // this will be executed after 10 timesif (showPopupAndGetResult() ==false) { // if user did not rateOnly.clearOnly(name) // clears rating Only data. This makes repeat again from 0 times onDo task.
}
}
}
And I implemented marking feature on version 1.0.3.
I think this is a solution that implementing remind them every 10 app startups 2 times using marking.
only("whatsNew", times =20) {
onDo {
val marking =Only.getMarking(name)!!.toInt()
Only.mark(name, marking +1)
if (marking %10==0) {
showPopup()
}
}
version("1.0.0.0")
mark(1)
}
But I think it is not too clear and simple for resolving Variant 2) yet.
It seems better implementing other feature which related to repeating a task every X times.
Anyway, thank you for your issue! :)
I almost wanted to implement the Once library (https://github.com/jonfinerty/Once) until I found your library. The Once has a feature I'd really like to see in Only and that is repeating a task every X times. There can be multiple variants for this feature.
Variant 1) perform action on the first time (when action has never been performed) and after X times
Variant 2) perform action after X times
Variant 3) perform action after X times and keep redoing this for Y times or an infinite amount of times
Examples:
Ask user to rate app after opening the app 10 times, keep asking again after 10 times until the user has rated the app
Notify user about new feature on the app launch and remind them every 10 app startups 2 times (meaning this action is done after 20 app startups)
Keep reminding the user about something every X times for-ever
I hope you can consider this functionality and for starters just implement the basic one (variant 1 or 2)
The text was updated successfully, but these errors were encountered: