Skip to content

Commit

Permalink
Hide edit options for logged-out users in Explore screen (#5920)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saifuddin53 authored Nov 7, 2024
1 parent 3bd7b53 commit a70d585
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,12 @@ && getParentFragment() instanceof MediaDetailPagerFragment) {

if (!sessionManager.isUserLoggedIn()) {
binding.categoryEditButton.setVisibility(GONE);
binding.descriptionEdit.setVisibility(GONE);
binding.depictionsEditButton.setVisibility(GONE);
} else {
binding.categoryEditButton.setVisibility(VISIBLE);
binding.descriptionEdit.setVisibility(VISIBLE);
binding.depictionsEditButton.setVisibility(VISIBLE);
}

if(applicationKvStore.getBoolean("login_skipped")){
Expand Down Expand Up @@ -400,7 +406,6 @@ public void onGlobalLayout() {
}
);
binding.progressBarEdit.setVisibility(GONE);
binding.descriptionEdit.setVisibility(VISIBLE);
}

@Override
Expand Down Expand Up @@ -678,7 +683,9 @@ private void updateCategoryList(final String s) {
// Stick in a filler element.
allCategories.add(getString(R.string.detail_panel_cats_none));
}
binding.categoryEditButton.setVisibility(VISIBLE);
if(sessionManager.isUserLoggedIn()) {
binding.categoryEditButton.setVisibility(VISIBLE);
}
rebuildCatList(allCategories);
}

Expand Down

0 comments on commit a70d585

Please sign in to comment.