Skip to content

Commit

Permalink
fix: donation UI visibility issue
Browse files Browse the repository at this point in the history
Signed-off-by: Amr Hossam <amrhossam.dev@gmail.com>
  • Loading branch information
amrhossamdev authored and aaronbrethorst committed Aug 28, 2024
1 parent e38b943 commit 029e275
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,8 @@ private void goToNavDrawerItem(int item) {
startActivity(i);
break;
}
updateDonationsUIVisibility();
if (mCurrentNavDrawerPosition != NAVDRAWER_ITEM_NEARBY) {
updateDonationsUIVisibility();
WeatherUtils.toggleWeatherViewVisibility(false,weatherView);
}else{
setWeatherData();
Expand Down Expand Up @@ -2097,9 +2097,10 @@ private void setupDonationView(HomeActivity homeActivity) {

private void updateDonationsUIVisibility() {
mDonationView = findViewById(R.id.donationView);
if(mDonationView == null) return;
DonationsManager donationsManager = Application.getDonationsManager();

if (donationsManager.shouldShowDonationUI()) {
if (donationsManager.shouldShowDonationUI() && mCurrentNavDrawerPosition == NAVDRAWER_ITEM_NEARBY) {
mDonationView.setVisibility(View.VISIBLE);
}
else {
Expand Down

0 comments on commit 029e275

Please sign in to comment.