mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-29 05:43:55 +01:00
Convert upload to kotlin (part 1) (#6024)
* Convert upload dagger module to kotlin * Code cleanup and convert the upload contract to kotlin * Code cleanup and convert CategoriesContract to kotlin * Code cleanup and convert MediaLicenseContract to kotlin * Code cleanup and convert UploadMediaDetailsContract to kotlin * Code cleanup, fixed nullability and converted DepictsContract to kotlin * Removed unused class * Convert FileMetadataUtils to kotlin * Convert EXIFReader to kotlin * Convert FileUtils to kotlin * Convert FileUtilsWrapper to kotlin * Convert ImageProcessingService to kotlin * Convert PageContentsCreator to kotlin * Convert PendingUploadsPresenter and contract to Kotlin with some code-cleanup * Convert ReadFBMD to kotlin * Convert SimilarImageInterface to kotlin * Removed unused classes * Fix merge/rebase issue --------- Co-authored-by: Nicolas Raoul <nicolas.raoul@gmail.com>
This commit is contained in:
parent
cb007608d9
commit
2c8c441f25
55 changed files with 1595 additions and 1835 deletions
|
|
@ -29,6 +29,7 @@ import fr.free.nrw.commons.settings.Prefs
|
|||
import fr.free.nrw.commons.upload.UploadController
|
||||
import fr.free.nrw.commons.upload.depicts.DepictsDao
|
||||
import fr.free.nrw.commons.utils.ConfigUtils.isBetaFlavour
|
||||
import fr.free.nrw.commons.utils.TimeProvider
|
||||
import fr.free.nrw.commons.wikidata.WikidataEditListener
|
||||
import fr.free.nrw.commons.wikidata.WikidataEditListenerImpl
|
||||
import io.reactivex.Scheduler
|
||||
|
|
@ -224,6 +225,11 @@ open class CommonsApplicationModule(private val applicationContext: Context) {
|
|||
fun providesContentResolver(context: Context): ContentResolver =
|
||||
context.contentResolver
|
||||
|
||||
@Provides
|
||||
fun provideTimeProvider(): TimeProvider {
|
||||
return TimeProvider(System::currentTimeMillis)
|
||||
}
|
||||
|
||||
companion object {
|
||||
const val IO_THREAD: String = "io_thread"
|
||||
const val MAIN_THREAD: String = "main_thread"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue