From cce7779137d4513c50c7c3b05de43b4a6514e8bc Mon Sep 17 00:00:00 2001 From: jonggeunpark <53558710+jonggeunpark@users.noreply.github.com> Date: Fri, 15 May 2020 21:47:33 +0900 Subject: [PATCH] kiwix#2081 Convert HistorModule to Kotlin --- .../{HistoryModule.java => HistoryModule.kt} | 14 ++++++-------- .../kiwixmobile/core/history/HistoryPresenter.kt | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) rename core/src/main/java/org/kiwix/kiwixmobile/core/history/{HistoryModule.java => HistoryModule.kt} (71%) diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/history/HistoryModule.java b/core/src/main/java/org/kiwix/kiwixmobile/core/history/HistoryModule.kt similarity index 71% rename from core/src/main/java/org/kiwix/kiwixmobile/core/history/HistoryModule.java rename to core/src/main/java/org/kiwix/kiwixmobile/core/history/HistoryModule.kt index b66e70f5b..8cf0febac 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/history/HistoryModule.java +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/history/HistoryModule.kt @@ -1,6 +1,6 @@ /* * Kiwix Android - * Copyright (c) 2019 Kiwix + * Copyright (c) 2020 Kiwix * 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 * 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.Provides; +import dagger.Module +import dagger.Provides @Module -public class HistoryModule { +class HistoryModule { @Provides - HistoryContract.Presenter provideHistoryPresenter(HistoryPresenter presenter) { - return presenter; - } + fun provideHistoryPresenter(presenter: HistoryPresenter): HistoryContract.Presenter = presenter } diff --git a/core/src/main/java/org/kiwix/kiwixmobile/core/history/HistoryPresenter.kt b/core/src/main/java/org/kiwix/kiwixmobile/core/history/HistoryPresenter.kt index 54b67d8f6..2c7357ce8 100644 --- a/core/src/main/java/org/kiwix/kiwixmobile/core/history/HistoryPresenter.kt +++ b/core/src/main/java/org/kiwix/kiwixmobile/core/history/HistoryPresenter.kt @@ -30,7 +30,7 @@ import org.kiwix.kiwixmobile.core.history.HistoryContract.View import org.kiwix.kiwixmobile.core.history.HistoryListItem.HistoryItem import javax.inject.Inject -internal class HistoryPresenter @Inject constructor( +class HistoryPresenter @Inject constructor( private val dataSource: DataSource, @param:MainThread private val mainThread: Scheduler, @param:Computation private val computation: Scheduler