fix: resolve citizenship bottom sheet not opening on button tap

Event(null) was swallowed by EventObserver's ?.let pattern, preventing
the CitizenshipBottomSheet from opening when tapping dashboard buttons.
Changed to Event("") with ifBlank conversion to preserve null referrer
semantics while ensuring the observer callback fires.
This commit is contained in:
Kurdistan Tech Ministry committed 2026-03-01 22:08:19 +03:00
1 parent d33a0a6289
commit 5705d0d578
2 files changed
+2 -2

No files matched your search

@@ -179,7 +179,7 @@ class BalanceListFragment :
viewModel.assetViewModeModelFlow.observe { manageAssetsAdapter.setAssetViewModeModel(it) }
viewModel.openCitizenshipEvent.observeEvent { referrer ->
CitizenshipBottomSheet.newInstance(referrer).show(childFragmentManager, "citizenship")
CitizenshipBottomSheet.newInstance(referrer.ifBlank { null }).show(childFragmentManager, "citizenship")
}
viewModel.shareReferralEvent.observeEvent { shareText ->
@@ -414,7 +414,7 @@ class BalanceListViewModel(
}
fun basvuruClicked() = launchUnit {
_openCitizenshipEvent.postValue(Event(null))
_openCitizenshipEvent.postValue(Event(""))
}
fun shareReferralClicked() = launchUnit {