mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 08:23:40 +02:00
Code review changes
This commit is contained in:
parent
85cff19020
commit
054e6041af
1 changed files with 11 additions and 11 deletions
|
@ -53,6 +53,7 @@ public class DomainAdapter extends RecyclerView.Adapter<DomainAdapter.ViewHolder
|
||||||
domainProvider.retrieve(filterText, new DomainProvider.DomainCallback() {
|
domainProvider.retrieve(filterText, new DomainProvider.DomainCallback() {
|
||||||
@Override
|
@Override
|
||||||
public void retrieveOk(List<Domain> domain) {
|
public void retrieveOk(List<Domain> domain) {
|
||||||
|
if (filterText.length() == 0) {
|
||||||
Domain lastVisitedDomain = new Domain(mContext.getString(R.string.your_last_location), mLastLocation, DEFAULT_THUMBNAIL_PLACE);
|
Domain lastVisitedDomain = new Domain(mContext.getString(R.string.your_last_location), mLastLocation, DEFAULT_THUMBNAIL_PLACE);
|
||||||
if (!mLastLocation.isEmpty() && mLastLocation.contains("://")) {
|
if (!mLastLocation.isEmpty() && mLastLocation.contains("://")) {
|
||||||
int startIndex = mLastLocation.indexOf("://");
|
int startIndex = mLastLocation.indexOf("://");
|
||||||
|
@ -64,12 +65,11 @@ public class DomainAdapter extends RecyclerView.Adapter<DomainAdapter.ViewHolder
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (filterText.length() == 0) {
|
|
||||||
domain.add(0, lastVisitedDomain);
|
domain.add(0, lastVisitedDomain);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Domain d : domain) {
|
for (Domain d : domain) {
|
||||||
|
// we override the default picture added in the server by an android specific version
|
||||||
if (d.thumbnail != null &&
|
if (d.thumbnail != null &&
|
||||||
d.thumbnail.endsWith("assets/places/thumbnail-default-place-e5a3f33e773ab699495774990a562f9f7693dc48ef90d8be6985c645a0280f75.png")) {
|
d.thumbnail.endsWith("assets/places/thumbnail-default-place-e5a3f33e773ab699495774990a562f9f7693dc48ef90d8be6985c645a0280f75.png")) {
|
||||||
d.thumbnail = DEFAULT_THUMBNAIL_PLACE;
|
d.thumbnail = DEFAULT_THUMBNAIL_PLACE;
|
||||||
|
|
Loading…
Reference in a new issue