Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,11 @@ open class InvoicesActivity : AppCompatActivity() {
val isFragmentInBackStack = fragment != null && fragment.isAdded

setSiblingViewsEnabled(!isFragmentInBackStack)
if (isFragmentInBackStack) {
setActivityTitle(DisplayedScreen.ReviewScreen)
}

supportFragmentManager.addOnBackStackChangedListener {

val findFragment = supportFragmentManager.findFragmentByTag(REVIEW_FRAGMENT_TAG)
val isFragmentInBackStackChanged = findFragment != null && findFragment.isAdded

setSiblingViewsEnabled(!isFragmentInBackStackChanged)

if (!isFragmentInBackStackChanged) {
title = resources.getString(R.string.title_activity_invoices)
}

invalidateOptionsMenu()
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class GiniHealth(
val openBankState: StateFlow<PaymentState> = _openBankState

private val _displayedScreen: MutableSharedFlow<DisplayedScreen> =
MutableSharedFlow(extraBufferCapacity = 1)
MutableSharedFlow(replay = 1, extraBufferCapacity = 1)
Copy link

Copilot AI Aug 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding both replay = 1 and extraBufferCapacity = 1 may be redundant. The replay parameter already provides buffering for the last emitted value. Consider using just replay = 1 unless there's a specific need for additional buffer capacity beyond the replayed value.

Suggested change
MutableSharedFlow(replay = 1, extraBufferCapacity = 1)
MutableSharedFlow(replay = 1)

Copilot uses AI. Check for mistakes.


/**
* A flow for exposing the [DisplayedScreen] currently visible. It always starts with [DisplayedScreen.Nothing].
Expand Down