Skip to content

Commit 4ff04e8

Browse files
committed
Fix log sharing
1 parent e9cd024 commit 4ff04e8

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

app/src/main/java/moe/reimu/catshare/SettingsActivity.kt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,10 @@ fun SettingsActivityContent() {
147147
"${BuildConfig.APPLICATION_ID}.fileProvider",
148148
logFile
149149
)
150-
val intent =
151-
Intent(Intent.ACTION_SEND).setDataAndType(uri, "text/plain")
152-
.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
150+
val intent = Intent(Intent.ACTION_SEND)
151+
.putExtra(Intent.EXTRA_STREAM, uri)
152+
.setType("text/plain")
153+
.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION)
153154
activity.startActivity(intent)
154155
} catch (e: Exception) {
155156
Log.e("LogcatCapture", "Failed to save logs", e)

0 commit comments

Comments
 (0)