Remove redundant code in BackupModule.kt

This commit is contained in:
Brandon Presley 2024-02-11 18:21:46 +13:00
parent 20781ddafe
commit 71d425ca03
1 changed files with 2 additions and 2 deletions

View File

@ -24,7 +24,7 @@ class BackupModule(context: ReactApplicationContext?) :
private val copyReceiver = object : BroadcastReceiver() {
@RequiresApi(Build.VERSION_CODES.O)
override fun onReceive(context: Context?, intent: Intent?) {
val targetDir = intent?.getStringExtra("targetDir");
val targetDir = intent?.getStringExtra("targetDir")
Log.d("BackupModule", "onReceive $targetDir")
val treeUri: Uri = Uri.parse(targetDir)
val documentFile = context?.let { DocumentFile.fromTreeUri(it, treeUri) }
@ -76,7 +76,7 @@ class BackupModule(context: ReactApplicationContext?) :
alarmMgr.cancel(pendingIntent)
}
@ReactMethod()
@ReactMethod
fun exportToCSV(promise: Promise) {
try {
val db = DatabaseHelper(reactApplicationContext)