diff --git a/app/src/main/kotlin/dev/quackbyte/punchboard/model/Timesheet.kt b/app/src/main/kotlin/dev/quackbyte/punchboard/model/Timesheet.kt index d6884ec..ced63f7 100644 --- a/app/src/main/kotlin/dev/quackbyte/punchboard/model/Timesheet.kt +++ b/app/src/main/kotlin/dev/quackbyte/punchboard/model/Timesheet.kt @@ -133,5 +133,5 @@ fun timesheetCsv(rows: List, period: PeriodResult, pay: PayResult, money.forEach { (label, amount) -> lines += listOf("$label ($currency)", amount * rate) } } // CRLF and a BOM so Excel opens it as UTF-8 with the en dashes intact. - return "" + lines.joinToString("\r\n") { line -> line.joinToString(",") { csvCell(it) } } + return "\uFEFF" + lines.joinToString("\r\n") { line -> line.joinToString(",") { csvCell(it) } } } diff --git a/app/src/main/kotlin/dev/quackbyte/punchboard/widget/PunchWidget.kt b/app/src/main/kotlin/dev/quackbyte/punchboard/widget/PunchWidget.kt index 4cb4651..437196d 100644 --- a/app/src/main/kotlin/dev/quackbyte/punchboard/widget/PunchWidget.kt +++ b/app/src/main/kotlin/dev/quackbyte/punchboard/widget/PunchWidget.kt @@ -1,5 +1,6 @@ package dev.quackbyte.punchboard.widget +import android.annotation.SuppressLint import android.app.PendingIntent import android.appwidget.AppWidgetManager import android.appwidget.AppWidgetProvider @@ -201,7 +202,9 @@ class PunchTileService : TileService() { } } + // Android 14 throws on the Intent overload, which only older versions reach here. @Suppress("DEPRECATION") + @SuppressLint("StartActivityAndCollapseDeprecated") private fun openApp() { val intent = Intent(this, MainActivity::class.java).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK) if (android.os.Build.VERSION.SDK_INT >= 34) {