Comments (3)
@zunjae
Hi, I thought about your multiple variants feature related to repeating a task every X times.
I implemented onLastDo
, onBeforeDone
features 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 times
if (showPopupAndGetResult() == false) { // if user did not rate
Only.clearOnly(name) // clears rating Only data. This makes repeat again from 0 times onDo task.
}
}
}
Variant 3) is quite similar.
only("repeat", times = 10) {
onLastDo {
Only.clearOnly(name)
// doSomething
}
}
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! :)
from only.
Looks good, thank you!
from only.
@zunjae
Thank you for your issue!
I will consider implementing those features next version. :)
from only.
Related Issues (3)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from only.