-
Notifications
You must be signed in to change notification settings - Fork 6
Add utils class. #2
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
Conversation
0445df8
to
d103a3e
Compare
/.idea/workspace.xml | ||
/.idea/navEditor.xml | ||
/.idea/assetWizardSettings.xml | ||
/.idea/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did you also remove the files from git?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
only has the initial commit files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the files that I commented in the previous PR that should be deleted doesn't appear as deleted in this PR. So you still have to delete those from git I think
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
* } | ||
* */ | ||
|
||
var ioThread: Executor = IoThreadExecutor() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation seems to be wrong
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
3a35be8
to
21b0ae2
Compare
21b0ae2
to
2beb691
Compare
* @param regex Regex string function to validate with Pattern.matches | ||
* @return Boolean : true if pattern match | ||
* */ | ||
fun String.validate(regex: String): Boolean = Pattern.matches(regex,this) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add space after comma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
fun Long.getDate(): DateTime = DateTime(this, DateTimeZone.UTC) | ||
fun DateTime.getLong(): Long = this.millis | ||
fun Any.toGson(): String = Gson().toJson(this) | ||
inline fun <reified T> String.fromGson() : T = Gson().fromJson(this,T :: class.java) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add space after comma
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
Sync Master-koin from original repo
Description
AppExecutors: android executors thread background and the main thread.
Converter: converter class.
Simple call back for action events.
Validator: basic validations.
TinyDb: Util class for shared preferences and save local data like images or other binaries files.