Skip to content

Commit 5b778af

Browse files
authored
Merge pull request #1 from commons-app/main
Update1
2 parents 1fbbc07 + 4dd1605 commit 5b778af

File tree

9 files changed

+688
-686
lines changed

9 files changed

+688
-686
lines changed

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

+5-5
Original file line numberDiff line numberDiff line change
@@ -182,11 +182,11 @@ class LoginActivity : AccountAuthenticatorActivity() {
182182

183183
override fun onSaveInstanceState(outState: Bundle) {
184184
// if progressDialog is visible during the configuration change then store state as true else false so that
185-
// we maintain visibility of progressDailog after configuration change
185+
// we maintain visibility of progressDialog after configuration change
186186
if (progressDialog != null && progressDialog!!.isShowing) {
187-
outState.putBoolean(saveProgressDailog, true)
187+
outState.putBoolean(saveProgressDialog, true)
188188
} else {
189-
outState.putBoolean(saveProgressDailog, false)
189+
outState.putBoolean(saveProgressDialog, false)
190190
}
191191
outState.putString(
192192
saveErrorMessage,
@@ -206,7 +206,7 @@ class LoginActivity : AccountAuthenticatorActivity() {
206206
super.onRestoreInstanceState(savedInstanceState)
207207
binding!!.loginUsername.setText(savedInstanceState.getString(saveUsername))
208208
binding!!.loginPassword.setText(savedInstanceState.getString(savePassword))
209-
if (savedInstanceState.getBoolean(saveProgressDailog)) {
209+
if (savedInstanceState.getBoolean(saveProgressDialog)) {
210210
performLogin()
211211
}
212212
val errorMessage = savedInstanceState.getString(saveErrorMessage)
@@ -396,7 +396,7 @@ class LoginActivity : AccountAuthenticatorActivity() {
396396
fun startYourself(context: Context) =
397397
context.startActivity(Intent(context, LoginActivity::class.java))
398398

399-
const val saveProgressDailog: String = "ProgressDailog_state"
399+
const val saveProgressDialog: String = "ProgressDialog_state"
400400
const val saveErrorMessage: String = "errorMessage"
401401
const val saveUsername: String = "username"
402402
const val savePassword: String = "password"

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

+4
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,8 @@ public Place getPlace() {
2020
public boolean getIsBookmarked() {
2121
return isBookmarked;
2222
}
23+
24+
public void setIsBookmarked(boolean isBookmarked) {
25+
this.isBookmarked = isBookmarked;
26+
}
2327
}

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323

2424
public class NearbyController extends MapController {
2525

26-
private static final int MAX_RESULTS = 1000;
2726
private final NearbyPlaces nearbyPlaces;
27+
public static final int MAX_RESULTS = 1000;
2828
public static double currentLocationSearchRadius = 10.0; //in kilometers
2929
public static LatLng currentLocation; // Users latest fetched location
3030
public static LatLng latestSearchLocation; // Can be current and camera target on search this area button is used

app/src/main/java/fr/free/nrw/commons/nearby/contract/NearbyParentFragmentContract.java

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@
22

33
import android.content.Context;
44
import androidx.annotation.Nullable;
5+
import androidx.lifecycle.LifecycleCoroutineScope;
56
import fr.free.nrw.commons.BaseMarker;
67
import fr.free.nrw.commons.kvstore.JsonKvStore;
78
import fr.free.nrw.commons.location.LatLng;
89
import fr.free.nrw.commons.location.LocationServiceManager.LocationChangeType;
910
import fr.free.nrw.commons.nearby.Label;
11+
import fr.free.nrw.commons.nearby.MarkerPlaceGroup;
1012
import fr.free.nrw.commons.nearby.Place;
1113
import java.util.List;
1214

@@ -68,7 +70,7 @@ interface View {
6870

6971
Context getContext();
7072

71-
void updateMapMarkers(List<BaseMarker> BaseMarkers);
73+
void replaceMarkerOverlays(List<MarkerPlaceGroup> markerPlaceGroups);
7274

7375
void filterOutAllMarkers();
7476

@@ -127,5 +129,7 @@ void filterByMarkerType(List<Label> selectedLabels, int state, boolean filterFor
127129
void setCheckboxUnknown();
128130

129131
void setAdvancedQuery(String query);
132+
133+
void toggleBookmarkedStatus(Place place);
130134
}
131135
}

0 commit comments

Comments
 (0)