-
Notifications
You must be signed in to change notification settings - Fork 51
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
Refactored MainActivity and AppDataUsageFragment to Kotlin, introduce… #190
Conversation
…d DataUsageViewModel and UsageDataHelperImpl for single responsibility, optimized UsageDataAdapter with AsyncListDiffer and click listeners in AppDataUsageFragment, replaced AsyncTask with Kotlin coroutines, and added debug suffix for debug package.
It used AsyncTask?? Sweet mother of god! |
@soshial 97% of the code is still in Java, so the use of AsyncTask is expected. The app has a great UI and good features, but the project needs to be migrated to Kotlin following proper architecture guidelines to reduce complexity and improve performance. |
@yatiksihag01 So I've been testing out the PR, and here's a few things the I noticed.
These were my initial impressions before any in-depth testing, so feel free to update me. Also, the build was compared against the release/2.3.2 build. |
@itsdrnoob Thanks for your feedback. Sorry I'm a bit busy for few days, but I'll review and address the issues as soon as possible. |
@yatiksihag01 No worries. I'll just keep the PR open for the time being. |
Thanks. Don't worry I'll fetch the latest changes to prevent any potential merge conflicts. |
Hi @itsdrnoob, I'm closing this PR and opening a new one as I've rebased this branch onto dev/2.4.0 |
MainActivity.java
andAppDataUsageFragment.java
to Kotlin.DataUsageViewModel.kt
andUsageDataHelperImpl.kt
.UsageDataAdapter.kt
usingAsyncListDiffer
and moved click listeners intoAppDataUsageFragment.kt
, which will improve efficiency.AsyncTask
operations with Kotlin coroutines, significantly decreasingAppDataUsageFragment.kt
loading time.