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:
Paul Hawke 2024-12-13 08:15:13 -06:00 committed by GitHub
parent cb007608d9
commit 2c8c441f25
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
55 changed files with 1595 additions and 1835 deletions

View file

@ -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"