Skip to content

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

Closed
wants to merge 4 commits into from
Closed

Conversation

amaury901130
Copy link
Collaborator

@amaury901130 amaury901130 commented May 6, 2019

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.

@amaury901130 amaury901130 force-pushed the enhancement/add-utils-class branch from 0445df8 to d103a3e Compare May 6, 2019 19:49
/.idea/workspace.xml
/.idea/navEditor.xml
/.idea/assetWizardSettings.xml
/.idea/*
Copy link
Contributor

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?

Copy link
Collaborator Author

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.

Copy link
Contributor

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

Copy link
Collaborator Author

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()
Copy link
Contributor

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@amaury901130 amaury901130 force-pushed the enhancement/add-utils-class branch from 3a35be8 to 21b0ae2 Compare May 6, 2019 20:51
@amaury901130 amaury901130 force-pushed the enhancement/add-utils-class branch from 21b0ae2 to 2beb691 Compare May 6, 2019 20:57
* @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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add space after comma

Copy link
Collaborator Author

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add space after comma

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@amaury901130 amaury901130 requested review from ximenaperez and mato2593 and removed request for ximenaperez May 10, 2019 20:42
@amaury901130 amaury901130 added invalid This doesn't seem right and removed invalid This doesn't seem right labels Sep 13, 2019
@CamilaMoscatelli CamilaMoscatelli deleted the enhancement/add-utils-class branch June 17, 2020 20:07
hrodrick added a commit that referenced this pull request Apr 21, 2022
Sync Master-koin from original repo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants