Skip to content

Commit

Permalink
Fixed Batch Tracker not working in non root mode
Browse files Browse the repository at this point in the history
  • Loading branch information
Hamza417 committed Dec 21, 2024
1 parent 7fa21c7 commit 35a77ff
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import app.simple.inure.R
import app.simple.inure.apk.utils.PackageUtils.isPackageInstalled
import app.simple.inure.extensions.viewmodels.RootServiceViewModel
import app.simple.inure.models.Tracker
import app.simple.inure.preferences.ConfigurationPreferences
import app.simple.inure.util.ArrayUtils.toArrayList
import app.simple.inure.util.ConditionUtils.isZero
import app.simple.inure.util.NullSafety.isNotNull
Expand All @@ -33,7 +34,11 @@ class BatchTrackersViewModel(application: Application, private val packages: Arr

private val trackers: MutableLiveData<ArrayList<Tracker>> by lazy {
MutableLiveData<ArrayList<Tracker>>().also {
initRootProc()
if (ConfigurationPreferences.isUsingRoot()) {
initRootProc()
} else {
scanTrackers()
}
}
}

Expand Down

0 comments on commit 35a77ff

Please sign in to comment.