Skip to content
This repository was archived by the owner on Mar 26, 2026. It is now read-only.

Commit 184dadd

Browse files
committed
Fix share
1 parent 1780f5a commit 184dadd

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

  • features/referral/presents/src/main/kotlin/com/gemwallet/features/referral/views

‎features/referral/presents/src/main/kotlin/com/gemwallet/features/referral/views/ReferralScene.kt‎

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ import com.gemwallet.android.ui.components.list_item.listItem
4848
import com.gemwallet.android.ui.components.list_item.property.PropertyItem
4949
import com.gemwallet.android.ui.components.list_item.property.PropertyTitleText
5050
import com.gemwallet.android.ui.components.parseMarkdownToAnnotatedString
51-
import com.gemwallet.android.ui.components.progress.CircularProgressIndicator14
5251
import com.gemwallet.android.ui.components.progress.CircularProgressIndicator16
5352
import com.gemwallet.android.ui.components.screen.Scene
5453
import com.gemwallet.android.ui.models.ListPosition
@@ -80,21 +79,20 @@ fun ReferralScene(
8079
if (inSync == SyncType.Init) return
8180

8281
val context = LocalContext.current
83-
val joinText = stringResource(R.string.rewards_share_text, "https://gemwallet.com/join?code=${rewards?.code}")
84-
val shareTitle = stringResource(id = R.string.common_share)
82+
val link = "https://gemwallet.com/join?code=${rewards?.code}"
83+
val joinText = stringResource(R.string.rewards_share_text, link)
84+
val shareTitle = stringResource(id = R.string.common_share, link)
8585

8686
val pullToRefreshState = rememberPullToRefreshState()
8787
var getStartedDialogShow by remember(rewards) { mutableStateOf(false) }
8888
var codeDialogShow by remember { mutableStateOf(false) }
8989

9090
val onShare = fun () {
9191
val type = "text/plain"
92-
val subject = joinText
93-
9492
val intent = Intent(Intent.ACTION_SEND)
9593
intent.type = type
96-
intent.putExtra(Intent.EXTRA_SUBJECT, subject)
97-
intent.putExtra(Intent.EXTRA_TEXT, rewards?.code)
94+
intent.putExtra(Intent.EXTRA_SUBJECT, link)
95+
intent.putExtra(Intent.EXTRA_TEXT, joinText)
9896

9997
context.startActivity(Intent.createChooser(intent, shareTitle))
10098
}

0 commit comments

Comments
 (0)