-
Notifications
You must be signed in to change notification settings - Fork 928
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
fixes lint rule and suppress non di usages #2902
fixes lint rule and suppress non di usages #2902
Conversation
Current dependencies on/for this PR:
This comment was auto-generated by Graphite. |
@@ -40,6 +41,7 @@ import kotlinx.coroutines.ensureActive | |||
import kotlinx.coroutines.flow.* | |||
import kotlinx.coroutines.launch | |||
|
|||
@SuppressLint("NoLifecycleObserver") // we don't use DI here |
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.
unsure if we prefer suppress or replace DefaultLifecycleObserver
by MainProcessLifecycleObserver
... I think better to suppress since we are not observing app lifecycle.
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.
Suppress yup
@@ -30,6 +31,7 @@ import androidx.lifecycle.DefaultLifecycleObserver | |||
import androidx.lifecycle.LifecycleOwner | |||
import com.duckduckgo.mobile.android.ui.view.setAllParentsClip | |||
|
|||
@SuppressLint("NoLifecycleObserver") // we don't use DI here |
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.
The comment is kinda wrong, the justification is not that we don't use DI
. Is that we're not observing the app lifecycle.
Same for other comments
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.
true. I was thinking about that when writing my previous comment 👍
@@ -66,6 +67,7 @@ import kotlinx.coroutines.isActive | |||
import kotlinx.coroutines.launch | |||
import timber.log.Timber | |||
|
|||
@SuppressLint("NoLifecycleObserver") // we don't use DI here |
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.
I don't see where the SettingsViewModel
observers the activity lifecycle. Maybe we need to fix that?
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.
mmm...you are right...not sure what's this doing here. I see onStop
cancels deviceShieldStatePollingJob
, which is always null. Gonna remove it, but please review it because probably related to AppTp old feature?
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.
Left some comments but haven't tested yet. Will test tomorrow
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.
Nice, thanks for taking care of this
Task/Issue URL: https://app.asana.com/0/1202552961248957/1204091058652565/f
Description
Fixes lint rule.
Steps to test this PR
Feature 1
UI changes