mirror of
https://github.com/bleackstorm/satiea.git
synced 2026-12-03 07:41:56 +01:00
- Add `photoUris` field to `MealEntry` and update Firestore rules. - Implement `UiEvent` handling in `MainActivity` for navigation/links. - Remove sensitive email data from error logs and clean up manifest.
23 lines
669 B
Kotlin
23 lines
669 B
Kotlin
package com.example.domain
|
|
|
|
import android.content.Context
|
|
import android.content.Intent
|
|
import android.net.Uri
|
|
import com.example.data.model.MealEntry
|
|
import com.example.util.CsvExporter
|
|
|
|
class CsvExportUseCase(private val context: Context) {
|
|
|
|
suspend fun writeToUri(targetUri: Uri, meals: List<MealEntry>): Result<Int> {
|
|
return CsvExporter.writeCsvToUri(context, targetUri, meals)
|
|
}
|
|
|
|
suspend fun createShareIntent(activityContext: Context, meals: List<MealEntry>): Result<Intent> {
|
|
return CsvExporter.shareCsvFile(activityContext, meals)
|
|
}
|
|
|
|
fun defaultFileName(): String {
|
|
return CsvExporter.buildDefaultFileName()
|
|
}
|
|
}
|