mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Hide edit options for logged-out users in Explore screen (#5920)
This commit is contained in:
parent
3bd7b533d4
commit
a70d585df8
1 changed files with 9 additions and 2 deletions
|
|
@ -272,6 +272,12 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
||||||
|
|
||||||
if (!sessionManager.isUserLoggedIn()) {
|
if (!sessionManager.isUserLoggedIn()) {
|
||||||
binding.categoryEditButton.setVisibility(GONE);
|
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")){
|
if(applicationKvStore.getBoolean("login_skipped")){
|
||||||
|
|
@ -400,7 +406,6 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
binding.progressBarEdit.setVisibility(GONE);
|
binding.progressBarEdit.setVisibility(GONE);
|
||||||
binding.descriptionEdit.setVisibility(VISIBLE);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
@ -678,7 +683,9 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
||||||
// Stick in a filler element.
|
// Stick in a filler element.
|
||||||
allCategories.add(getString(R.string.detail_panel_cats_none));
|
allCategories.add(getString(R.string.detail_panel_cats_none));
|
||||||
}
|
}
|
||||||
binding.categoryEditButton.setVisibility(VISIBLE);
|
if(sessionManager.isUserLoggedIn()) {
|
||||||
|
binding.categoryEditButton.setVisibility(VISIBLE);
|
||||||
|
}
|
||||||
rebuildCatList(allCategories);
|
rebuildCatList(allCategories);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue