Javadocs added

This commit is contained in:
Ujjwal Agrawal 2018-07-31 12:40:12 +05:30
parent 8732c79f14
commit 987fff0c38
4 changed files with 10 additions and 11 deletions

View file

@ -183,8 +183,8 @@ public class LoginActivity extends AccountAuthenticatorActivity {
}
if (sessionManager.getCurrentAccount() != null
&& sessionManager.isUserLoggedIn()
&& sessionManager.getCachedAuthCookie() != null) {
&& sessionManager.isUserLoggedIn()
&& sessionManager.getCachedAuthCookie() != null) {
prefs.edit().putBoolean("login_skipped", false).apply();
sessionManager.revalidateAuthToken();
startMainActivity();

View file

@ -15,7 +15,6 @@ import android.support.annotation.NonNull;
import android.support.design.widget.BottomSheetBehavior;
import android.support.v4.app.FragmentTransaction;
import android.support.v7.app.AlertDialog;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
@ -33,9 +32,7 @@ import javax.inject.Named;
import butterknife.BindView;
import butterknife.ButterKnife;
import fr.free.nrw.commons.CommonsApplication;
import fr.free.nrw.commons.R;
import fr.free.nrw.commons.auth.LoginActivity;
import fr.free.nrw.commons.location.LatLng;
import fr.free.nrw.commons.location.LocationServiceManager;
import fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType;
@ -53,8 +50,10 @@ import timber.log.Timber;
import uk.co.deanwild.materialshowcaseview.IShowcaseListener;
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView;
import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.*;
import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.LOCATION_SIGNIFICANTLY_CHANGED;
import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.LOCATION_SLIGHTLY_CHANGED;
import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.MAP_UPDATED;
import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.PERMISSION_JUST_GRANTED;
public class NearbyActivity extends NavigationBaseActivity implements LocationUpdateListener,

View file

@ -38,7 +38,6 @@ import static android.content.pm.PackageManager.PERMISSION_GRANTED;
import static fr.free.nrw.commons.wikidata.WikidataConstants.WIKIDATA_ENTITY_ID_PREF;
public class NearbyListFragment extends DaggerFragment {
private Bundle bundleForUpdates; // Carry information from activity about changed nearby places and current location
private static final Type LIST_TYPE = new TypeToken<List<Place>>() {
@ -140,6 +139,7 @@ public class NearbyListFragment extends DaggerFragment {
}
}
@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);

View file

@ -384,9 +384,6 @@ public class NearbyMapFragment extends DaggerFragment {
.setMessage(R.string.login_alert_message)
.setPositiveButton(R.string.login, (dialog, which) -> {
// logout of the app
// startActivityWithFlags( getContext(), CategoryImagesActivity.class, Intent.FLAG_ACTIVITY_CLEAR_TOP,
// Intent.FLAG_ACTIVITY_SINGLE_TOP);
// getActivity().finish();
BaseLogoutListener logoutListener = new BaseLogoutListener();
CommonsApplication app = (CommonsApplication) getActivity().getApplication();
app.clearApplicationData(getContext(), logoutListener);
@ -514,6 +511,9 @@ public class NearbyMapFragment extends DaggerFragment {
mapView.setStyleUrl("asset://mapstyle.json");
}
/**
* onLogoutComplete is called after shared preferences and data stored in local database are cleared.
*/
private class BaseLogoutListener implements CommonsApplication.LogoutListener {
@Override
public void onLogoutComplete() {
@ -816,7 +816,7 @@ public class NearbyMapFragment extends DaggerFragment {
}
private void animateFAB(boolean isFabOpen) {
this.isFabOpen = !isFabOpen;
this.isFabOpen = !isFabOpen;
if (fabPlus.isShown()){
if (isFabOpen) {
fabPlus.startAnimation(rotate_backward);