Use bundleOf everywhere I can
This commit is contained in:
@@ -2,6 +2,7 @@ package exh.md.follows
|
||||
|
||||
import android.os.Bundle
|
||||
import android.view.Menu
|
||||
import androidx.core.os.bundleOf
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.source.CatalogueSource
|
||||
import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourceController
|
||||
@@ -13,9 +14,9 @@ import eu.kanade.tachiyomi.ui.browse.source.browse.BrowseSourcePresenter
|
||||
class MangaDexFollowsController(bundle: Bundle) : BrowseSourceController(bundle) {
|
||||
|
||||
constructor(source: CatalogueSource) : this(
|
||||
Bundle().apply {
|
||||
putLong(SOURCE_ID_KEY, source.id)
|
||||
}
|
||||
bundleOf(
|
||||
SOURCE_ID_KEY to source.id
|
||||
)
|
||||
)
|
||||
|
||||
override fun getTitle(): String? {
|
||||
|
||||
@@ -4,6 +4,7 @@ import android.os.Bundle
|
||||
import android.view.LayoutInflater
|
||||
import android.view.View
|
||||
import android.view.ViewGroup
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.recyclerview.widget.GridLayoutManager
|
||||
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
@@ -21,9 +22,9 @@ import uy.kohesive.injekt.api.get
|
||||
|
||||
class MetadataViewController : NucleusController<MetadataViewControllerBinding, MetadataViewPresenter> {
|
||||
constructor(manga: Manga?) : super(
|
||||
Bundle().apply {
|
||||
putLong(MangaController.MANGA_EXTRA, manga?.id ?: 0)
|
||||
}
|
||||
bundleOf(
|
||||
MangaController.MANGA_EXTRA to (manga?.id ?: 0)
|
||||
)
|
||||
) {
|
||||
this.manga = manga
|
||||
if (manga != null) {
|
||||
|
||||
@@ -3,6 +3,7 @@ package exh.widget.preference
|
||||
import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import androidx.core.os.bundleOf
|
||||
import androidx.core.view.isVisible
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import com.afollestad.materialdialogs.customview.customView
|
||||
@@ -35,12 +36,9 @@ class MangadexLoginDialog(bundle: Bundle? = null) : LoginDialogPreference(bundle
|
||||
val scope = CoroutineScope(Job() + Dispatchers.Main)
|
||||
|
||||
constructor(source: MangaDex) : this(
|
||||
Bundle().apply {
|
||||
putLong(
|
||||
"key",
|
||||
source.id
|
||||
)
|
||||
}
|
||||
bundleOf(
|
||||
"key" to source.id
|
||||
)
|
||||
)
|
||||
|
||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||
|
||||
@@ -2,6 +2,7 @@ package exh.widget.preference
|
||||
|
||||
import android.app.Dialog
|
||||
import android.os.Bundle
|
||||
import androidx.core.os.bundleOf
|
||||
import com.afollestad.materialdialogs.MaterialDialog
|
||||
import eu.kanade.tachiyomi.R
|
||||
import eu.kanade.tachiyomi.data.track.TrackManager
|
||||
@@ -20,7 +21,11 @@ class MangadexLogoutDialog(bundle: Bundle? = null) : DialogController(bundle) {
|
||||
|
||||
val trackManager: TrackManager by injectLazy()
|
||||
|
||||
constructor(source: Source) : this(Bundle().apply { putLong("key", source.id) })
|
||||
constructor(source: Source) : this(
|
||||
bundleOf(
|
||||
"key" to source.id
|
||||
)
|
||||
)
|
||||
|
||||
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
|
||||
return MaterialDialog(activity!!)
|
||||
|
||||
Reference in New Issue
Block a user