mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-11-03 08:13:55 +01:00
Merge pull request #1307 from ujjwalagrawal17/toast
Fixes #1301 Changes toasts to snacks
This commit is contained in:
commit
872b258720
2 changed files with 7 additions and 9 deletions
|
|
@ -274,7 +274,7 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
|
|||
LatLng lastLocation = locationManager.getLastLocation();
|
||||
if (curLatLang != null && curLatLang.equals(lastLocation)) { //refresh view only if location has changed
|
||||
if (isHardRefresh) {
|
||||
ViewUtil.showLongToast(this, R.string.nearby_location_has_not_changed);
|
||||
ViewUtil.showSnackbar(findViewById(R.id.container), R.string.nearby_location_has_not_changed);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
@ -301,9 +301,7 @@ public class NearbyActivity extends NavigationBaseActivity implements LocationUp
|
|||
String gsonCurLatLng = gson.toJson(curLatLang);
|
||||
|
||||
if (placeList.size() == 0) {
|
||||
int duration = Toast.LENGTH_SHORT;
|
||||
Toast toast = Toast.makeText(this, R.string.no_nearby, duration);
|
||||
toast.show();
|
||||
ViewUtil.showSnackbar(findViewById(R.id.container), R.string.no_nearby);
|
||||
}
|
||||
|
||||
bundle.clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue