mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 12:53:55 +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.R;
|
||||||
import fr.free.nrw.commons.Utils;
|
import fr.free.nrw.commons.Utils;
|
||||||
import fr.free.nrw.commons.auth.AccountUtil;
|
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.CategoryClient;
|
||||||
import fr.free.nrw.commons.category.CategoryDetailsActivity;
|
import fr.free.nrw.commons.category.CategoryDetailsActivity;
|
||||||
import fr.free.nrw.commons.category.CategoryEditHelper;
|
import fr.free.nrw.commons.category.CategoryEditHelper;
|
||||||
|
|
@ -107,6 +108,9 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
||||||
return mf;
|
return mf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Inject
|
||||||
|
SessionManager sessionManager;
|
||||||
|
|
||||||
@Inject
|
@Inject
|
||||||
MediaDataExtractor mediaDataExtractor;
|
MediaDataExtractor mediaDataExtractor;
|
||||||
@Inject
|
@Inject
|
||||||
|
|
@ -263,6 +267,10 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
||||||
authorLayout.setVisibility(GONE);
|
authorLayout.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!sessionManager.isUserLoggedIn()) {
|
||||||
|
categoryEditButton.setVisibility(GONE);
|
||||||
|
}
|
||||||
|
|
||||||
if(applicationKvStore.getBoolean("login_skipped")){
|
if(applicationKvStore.getBoolean("login_skipped")){
|
||||||
delete.setVisibility(GONE);
|
delete.setVisibility(GONE);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue