Parcourir la source

More consistent injectLazy style

arkon il y a 4 ans
Parent
commit
f667f85fa5

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchPresenter.kt

@@ -68,7 +68,7 @@ open class GlobalSearchPresenter(
      */
     private var fetchImageSubscription: Subscription? = null
 
-    private val extensionManager by injectLazy<ExtensionManager>()
+    private val extensionManager: ExtensionManager by injectLazy()
 
     private var extensionFilter: String? = null
 

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderActivity.kt

@@ -76,7 +76,7 @@ import kotlin.math.abs
 @RequiresPresenter(ReaderPresenter::class)
 class ReaderActivity : BaseRxActivity<ReaderActivityBinding, ReaderPresenter>() {
 
-    private val preferences by injectLazy<PreferencesHelper>()
+    private val preferences: PreferencesHelper by injectLazy()
 
     /**
      * The maximum bitmap size supported by the device.

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderSettingsSheet.kt

@@ -21,7 +21,7 @@ import uy.kohesive.injekt.injectLazy
  */
 class ReaderSettingsSheet(private val activity: ReaderActivity) : BottomSheetDialog(activity) {
 
-    private val preferences by injectLazy<PreferencesHelper>()
+    private val preferences: PreferencesHelper by injectLazy()
 
     private val binding = ReaderSettingsSheetBinding.inflate(activity.layoutInflater, null, false)
 

+ 2 - 4
app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/DownloadPageLoader.kt

@@ -21,10 +21,8 @@ class DownloadPageLoader(
     private val downloadManager: DownloadManager
 ) : PageLoader() {
 
-    /**
-     * The application context. Needed to open input streams.
-     */
-    private val context by injectLazy<Application>()
+    // Needed to open input streams
+    private val context: Application by injectLazy()
 
     /**
      * Returns an observable containing the pages found on this downloaded chapter.

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/recent/history/HistoryAdapter.kt

@@ -18,7 +18,7 @@ import java.text.DecimalFormatSymbols
 class HistoryAdapter(controller: HistoryController) :
     FlexibleAdapter<IFlexible<*>>(null, controller, true) {
 
-    val sourceManager by injectLazy<SourceManager>()
+    val sourceManager: SourceManager by injectLazy()
 
     val resumeClickListener: OnResumeClickListener = controller
     val removeClickListener: OnRemoveClickListener = controller

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/security/SecureActivityDelegate.kt

@@ -13,7 +13,7 @@ import java.util.Date
 
 class SecureActivityDelegate(private val activity: FragmentActivity) {
 
-    private val preferences by injectLazy<PreferencesHelper>()
+    private val preferences: PreferencesHelper by injectLazy()
 
     fun onCreate() {
         preferences.secureScreen().asFlow()

+ 1 - 1
app/src/main/java/eu/kanade/tachiyomi/ui/webview/WebViewActivity.kt

@@ -34,7 +34,7 @@ import uy.kohesive.injekt.injectLazy
 
 class WebViewActivity : BaseViewBindingActivity<WebviewActivityBinding>() {
 
-    private val sourceManager by injectLazy<SourceManager>()
+    private val sourceManager: SourceManager by injectLazy()
 
     private var bundle: Bundle? = null