mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-27 04:43:54 +01:00
Fixes #4229 - App Crashes while trying to nominate an item for deletion, When User is not logged in (#4237)
* Fixes the crash while nominating an item for deletion. * removed unnecessary code Co-authored-by: Pratham2305 <Pratham2305@users.noreply.github.com>
This commit is contained in:
parent
850d9411a5
commit
b8cdc5a537
1 changed files with 9 additions and 0 deletions
|
|
@ -61,6 +61,7 @@ import fr.free.nrw.commons.delete.DeleteHelper;
|
|||
import fr.free.nrw.commons.delete.ReasonBuilder;
|
||||
import fr.free.nrw.commons.explore.depictions.WikidataItemDetailsActivity;
|
||||
import fr.free.nrw.commons.di.CommonsDaggerSupportFragment;
|
||||
import fr.free.nrw.commons.kvstore.JsonKvStore;
|
||||
import fr.free.nrw.commons.nearby.Label;
|
||||
import fr.free.nrw.commons.ui.widget.HtmlTextView;
|
||||
import fr.free.nrw.commons.utils.ViewUtilWrapper;
|
||||
|
|
@ -74,6 +75,7 @@ import java.util.Locale;
|
|||
import java.util.concurrent.TimeUnit;
|
||||
import java.util.Map;
|
||||
import javax.inject.Inject;
|
||||
import javax.inject.Named;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.wikipedia.util.DateUtil;
|
||||
import timber.log.Timber;
|
||||
|
|
@ -117,6 +119,9 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
|||
ViewUtilWrapper viewUtil;
|
||||
@Inject
|
||||
CategoryClient categoryClient;
|
||||
@Inject
|
||||
@Named("default_preferences")
|
||||
JsonKvStore applicationKvStore;
|
||||
|
||||
private int initialListTop = 0;
|
||||
|
||||
|
|
@ -258,6 +263,10 @@ public class MediaDetailFragment extends CommonsDaggerSupportFragment implements
|
|||
authorLayout.setVisibility(GONE);
|
||||
}
|
||||
|
||||
if(applicationKvStore.getBoolean("login_skipped")){
|
||||
delete.setVisibility(GONE);
|
||||
}
|
||||
|
||||
return view;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue