Skip to content

Commit

Permalink
AND-9563 [Referral] Added handler for system navigation action "Back"
Browse files Browse the repository at this point in the history
  • Loading branch information
iiiburnyiii committed Dec 23, 2024
1 parent dabe04b commit 4cc51ed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions features/referral/presentation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ dependencies {
implementation(deps.androidx.appCompat)
implementation(deps.androidx.fragment.ktx)
implementation(deps.lifecycle.viewModel.ktx)
implementation(deps.androidx.activity.compose)

/** Compose */
implementation(deps.compose.foundation)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.tangem.feature.referral.ui

import android.content.res.Configuration
import android.content.res.Resources
import androidx.activity.compose.BackHandler
import androidx.annotation.DrawableRes
import androidx.compose.foundation.Image
import androidx.compose.foundation.background
Expand Down Expand Up @@ -52,6 +53,8 @@ internal fun ReferralScreen(stateHolder: ReferralStateHolder) {

val snackbarHostState = remember(::SnackbarHostState)

BackHandler(onBack = stateHolder.headerState.onBackClicked)

Scaffold(
topBar = {
AppBarWithBackButton(
Expand Down

0 comments on commit 4cc51ed

Please # to comment.