Skip to content

Commit 864da6b

Browse files
authored
Merge pull request #1640 from Npepperlinux/feature/share_button_use_url_first
Prefer `url` over `uri` for share button
2 parents 2fb5da7 + 4dab55b commit 864da6b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

shared/src/commonMain/kotlin/dev/dimension/flare/ui/model/mapper/Mastodon.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,10 @@ private fun Status.renderStatus(
317317
}
318318
val postUrl =
319319
buildString {
320-
if (!uri.isNullOrEmpty()) {
321-
append(uri)
322-
} else if (!url.isNullOrEmpty()) {
320+
if (!url.isNullOrEmpty()) {
323321
append(url)
322+
} else if (!uri.isNullOrEmpty()) {
323+
append(uri)
324324
} else {
325325
append("https://$host/@${account.acct}/$id")
326326
}

shared/src/commonMain/kotlin/dev/dimension/flare/ui/model/mapper/Misskey.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -373,10 +373,10 @@ private fun Note.renderStatus(
373373
.toPersistentList()
374374
val postUrl =
375375
buildString {
376-
if (!uri.isNullOrEmpty()) {
377-
append(uri)
378-
} else if (!url.isNullOrEmpty()) {
376+
if (!url.isNullOrEmpty()) {
379377
append(url)
378+
} else if (!uri.isNullOrEmpty()) {
379+
append(uri)
380380
} else {
381381
append("https://")
382382
append(accountKey.host)

0 commit comments

Comments
 (0)