-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Fix warnings for ImageFileLoader.kt #4786 #4789
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
Fix warnings for ImageFileLoader.kt #4786 #4789
Conversation
Codecov Report
@@ Coverage Diff @@
## master #4789 +/- ##
============================================
- Coverage 42.17% 42.03% -0.15%
+ Complexity 1888 1878 -10
============================================
Files 364 364
Lines 15735 15734 -1
Branches 1361 1361
============================================
- Hits 6637 6613 -24
- Misses 8610 8632 +22
- Partials 488 489 +1
Continue to review full report at Codecov.
|
@@ -82,7 +82,7 @@ class ImageFileLoader(val context: Context) : CoroutineScope{ | |||
|
|||
|
|||
if (file != null && file.exists()) { | |||
if (id != null && name != null && path != null && bucketId != null && bucketName != null) { | |||
if (name != null && path != null && bucketName != null) { |
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.
What warning does this fix? Are you sure there are no side effects? Thanks!
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.
This fixes the warning which shows
Condition 'id != null' is always 'true'
Condition 'bucketId != null' is always 'true'
there is no harm removing them
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.
Tested for 2 days, I did not notice any particular bug.
Fix warnings for ImageFileLoader.kt Fixes #4786
All warning solved except :- 'DATA: String' is deprecated. Deprecated in Java
because solveing this will require major code changes which is probably not necessary at this point of time