kiwix#2081 Convert HistorModule to Kotlin

This commit is contained in:
jonggeunpark 2020-05-15 21:47:33 +09:00
parent 4e6f29f079
commit cce7779137
2 changed files with 7 additions and 9 deletions

View File

@ -1,6 +1,6 @@
/* /*
* Kiwix Android * Kiwix Android
* Copyright (c) 2019 Kiwix <android.kiwix.org> * Copyright (c) 2020 Kiwix <android.kiwix.org>
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or * the Free Software Foundation, either version 3 of the License, or
@ -16,15 +16,13 @@
* *
*/ */
package org.kiwix.kiwixmobile.core.history; package org.kiwix.kiwixmobile.core.history
import dagger.Module; import dagger.Module
import dagger.Provides; import dagger.Provides
@Module @Module
public class HistoryModule { class HistoryModule {
@Provides @Provides
HistoryContract.Presenter provideHistoryPresenter(HistoryPresenter presenter) { fun provideHistoryPresenter(presenter: HistoryPresenter): HistoryContract.Presenter = presenter
return presenter;
}
} }

View File

@ -30,7 +30,7 @@ import org.kiwix.kiwixmobile.core.history.HistoryContract.View
import org.kiwix.kiwixmobile.core.history.HistoryListItem.HistoryItem import org.kiwix.kiwixmobile.core.history.HistoryListItem.HistoryItem
import javax.inject.Inject import javax.inject.Inject
internal class HistoryPresenter @Inject constructor( class HistoryPresenter @Inject constructor(
private val dataSource: DataSource, private val dataSource: DataSource,
@param:MainThread private val mainThread: Scheduler, @param:MainThread private val mainThread: Scheduler,
@param:Computation private val computation: Scheduler @param:Computation private val computation: Scheduler