Specify LazyThreadSafetyMode for inject and viewModel delegates
This commit is contained in:
@@ -9,7 +9,7 @@ import org.koitharu.kotatsu.tracker.ui.FeedViewModel
|
||||
val trackerModule
|
||||
get() = module {
|
||||
|
||||
single { TrackingRepository(get(), get()) }
|
||||
single { TrackingRepository(get()) }
|
||||
|
||||
viewModel { FeedViewModel(androidContext(), get()) }
|
||||
}
|
||||
@@ -5,12 +5,10 @@ import org.koitharu.kotatsu.core.db.MangaDatabase
|
||||
import org.koitharu.kotatsu.core.db.entity.TrackEntity
|
||||
import org.koitharu.kotatsu.core.db.entity.TrackLogEntity
|
||||
import org.koitharu.kotatsu.core.model.*
|
||||
import org.koitharu.kotatsu.local.domain.LocalMangaRepository
|
||||
import java.util.*
|
||||
|
||||
class TrackingRepository(
|
||||
private val db: MangaDatabase,
|
||||
private val localMangaRepository: LocalMangaRepository
|
||||
) {
|
||||
|
||||
suspend fun getNewChaptersCount(mangaId: Long): Int {
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.koitharu.kotatsu.utils.progress.Progress
|
||||
class FeedFragment : BaseFragment<FragmentFeedBinding>(), PaginationScrollListener.Callback,
|
||||
OnListItemClickListener<Manga> {
|
||||
|
||||
private val viewModel by viewModel<FeedViewModel>()
|
||||
private val viewModel by viewModel<FeedViewModel>(mode = LazyThreadSafetyMode.NONE)
|
||||
|
||||
private var feedAdapter: FeedAdapter? = null
|
||||
private var updateStatusSnackbar: Snackbar? = null
|
||||
|
||||
Reference in New Issue
Block a user