mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Removed category editing accessibility when user not logged in (#4251)
This commit is contained in:
parent
a83006fc7b
commit
0ec62170fc
1 changed files with 9 additions and 1 deletions
|
|
@ -51,6 +51,7 @@ import fr.free.nrw.commons.MediaDataExtractor;
|
|||
import fr.free.nrw.commons.R;
|
||||
import fr.free.nrw.commons.Utils;
|
||||
import fr.free.nrw.commons.auth.AccountUtil;
|
||||
import fr.free.nrw.commons.auth.SessionManager;
|
||||
import fr.free.nrw.commons.category.CategoryClient;
|
||||
import fr.free.nrw.commons.category.CategoryDetailsActivity;
|
||||
import fr.free.nrw.commons.category.CategoryEditHelper;
|
||||
|
|
@ -107,6 +108,9 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
|||
return mf;
|
||||
}
|
||||
|
||||
@Inject
|
||||
SessionManager sessionManager;
|
||||
|
||||
@Inject
|
||||
MediaDataExtractor mediaDataExtractor;
|
||||
@Inject
|
||||
|
|
@ -263,10 +267,14 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
|||
authorLayout.setVisibility(GONE);
|
||||
}
|
||||
|
||||
if (!sessionManager.isUserLoggedIn()) {
|
||||
categoryEditButton.setVisibility(GONE);
|
||||
}
|
||||
|
||||
if(applicationKvStore.getBoolean("login_skipped")){
|
||||
delete.setVisibility(GONE);
|
||||
}
|
||||
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue