Skip to content

Commit 987fff0

Browse files
Javadocs added
1 parent 8732c79 commit 987fff0

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

app/src/main/java/fr/free/nrw/commons/auth/LoginActivity.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ protected void onResume() {
183183
}
184184

185185
if (sessionManager.getCurrentAccount() != null
186-
&& sessionManager.isUserLoggedIn()
187-
&& sessionManager.getCachedAuthCookie() != null) {
186+
&& sessionManager.isUserLoggedIn()
187+
&& sessionManager.getCachedAuthCookie() != null) {
188188
prefs.edit().putBoolean("login_skipped", false).apply();
189189
sessionManager.revalidateAuthToken();
190190
startMainActivity();

app/src/main/java/fr/free/nrw/commons/nearby/NearbyActivity.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
import android.support.design.widget.BottomSheetBehavior;
1616
import android.support.v4.app.FragmentTransaction;
1717
import android.support.v7.app.AlertDialog;
18-
1918
import android.view.Menu;
2019
import android.view.MenuInflater;
2120
import android.view.MenuItem;
@@ -33,9 +32,7 @@
3332

3433
import butterknife.BindView;
3534
import butterknife.ButterKnife;
36-
import fr.free.nrw.commons.CommonsApplication;
3735
import fr.free.nrw.commons.R;
38-
import fr.free.nrw.commons.auth.LoginActivity;
3936
import fr.free.nrw.commons.location.LatLng;
4037
import fr.free.nrw.commons.location.LocationServiceManager;
4138
import fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType;
@@ -53,8 +50,10 @@
5350
import uk.co.deanwild.materialshowcaseview.IShowcaseListener;
5451
import uk.co.deanwild.materialshowcaseview.MaterialShowcaseView;
5552

56-
import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.*;
53+
import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.LOCATION_SIGNIFICANTLY_CHANGED;
54+
import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.LOCATION_SLIGHTLY_CHANGED;
5755
import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.MAP_UPDATED;
56+
import static fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType.PERMISSION_JUST_GRANTED;
5857

5958

6059
public class NearbyActivity extends NavigationBaseActivity implements LocationUpdateListener,

app/src/main/java/fr/free/nrw/commons/nearby/NearbyListFragment.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@
3838
import static fr.free.nrw.commons.wikidata.WikidataConstants.WIKIDATA_ENTITY_ID_PREF;
3939

4040
public class NearbyListFragment extends DaggerFragment {
41-
4241
private Bundle bundleForUpdates; // Carry information from activity about changed nearby places and current location
4342

4443
private static final Type LIST_TYPE = new TypeToken<List<Place>>() {
@@ -140,6 +139,7 @@ public void onRequestPermissionsResult(int requestCode, @NonNull String[] permis
140139
}
141140
}
142141

142+
143143
@Override
144144
public void onActivityResult(int requestCode, int resultCode, Intent data) {
145145
super.onActivityResult(requestCode, resultCode, data);

app/src/main/java/fr/free/nrw/commons/nearby/NearbyMapFragment.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,6 @@ private void setListeners() {
384384
.setMessage(R.string.login_alert_message)
385385
.setPositiveButton(R.string.login, (dialog, which) -> {
386386
// logout of the app
387-
// startActivityWithFlags( getContext(), CategoryImagesActivity.class, Intent.FLAG_ACTIVITY_CLEAR_TOP,
388-
// Intent.FLAG_ACTIVITY_SINGLE_TOP);
389-
// getActivity().finish();
390387
BaseLogoutListener logoutListener = new BaseLogoutListener();
391388
CommonsApplication app = (CommonsApplication) getActivity().getApplication();
392389
app.clearApplicationData(getContext(), logoutListener);
@@ -514,6 +511,9 @@ public void onMapReady(MapboxMap mapboxMap) {
514511
mapView.setStyleUrl("asset://mapstyle.json");
515512
}
516513

514+
/**
515+
* onLogoutComplete is called after shared preferences and data stored in local database are cleared.
516+
*/
517517
private class BaseLogoutListener implements CommonsApplication.LogoutListener {
518518
@Override
519519
public void onLogoutComplete() {
@@ -816,7 +816,7 @@ private void openWebView(Uri link) {
816816
}
817817

818818
private void animateFAB(boolean isFabOpen) {
819-
this.isFabOpen = !isFabOpen;
819+
this.isFabOpen = !isFabOpen;
820820
if (fabPlus.isShown()){
821821
if (isFabOpen) {
822822
fabPlus.startAnimation(rotate_backward);

0 commit comments

Comments
 (0)