Skip to content

Commit

Permalink
Update imports
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed Oct 18, 2023
1 parent d9d8d82 commit b2b0143
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/src/standard/java/com/infomaniak/drive/GeniusScanUtils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import com.geniusscansdk.core.GeniusScanSDK
import com.geniusscansdk.core.LicenseException
import com.geniusscansdk.scanflow.ScanActivity
import com.geniusscansdk.scanflow.ScanConfiguration
import com.geniusscansdk.scanflow.ScanConfiguration.*
import com.geniusscansdk.scanflow.ScanResult
import com.infomaniak.drive.data.models.File
import com.infomaniak.drive.ui.SaveExternalFilesActivity
Expand Down Expand Up @@ -57,11 +58,11 @@ object GeniusScanUtils : IGeniusScanUtils {
"spa" to R.raw.spa,
)

private fun Context.getOcrConfiguration(): ScanConfiguration.OcrConfiguration {
private fun Context.getOcrConfiguration(): OcrConfiguration {
copyOcrDataFiles()

return ScanConfiguration.OcrConfiguration().apply {
outputFormats = EnumSet.of(ScanConfiguration.OcrOutputFormat.TEXT_LAYER_IN_PDF)
return OcrConfiguration().apply {
outputFormats = EnumSet.of(OcrOutputFormat.TEXT_LAYER_IN_PDF)
languages = supportedLanguages.keys.toList()
languagesDirectory = getOCRdataDirectory()
}
Expand Down Expand Up @@ -141,7 +142,7 @@ object GeniusScanUtils : IGeniusScanUtils {

private fun Context.scanWithConfiguration(
scanConfiguration: ScanConfiguration,
resultLauncher: ActivityResultLauncher<Intent>
resultLauncher: ActivityResultLauncher<Intent>,
) {
Intent(this, ScanActivity::class.java).apply {
putExtra(SCAN_CONFIGURATION_KEY, scanConfiguration)
Expand Down

0 comments on commit b2b0143

Please sign in to comment.