[search][android] Remove getFormattedDescription

Signed-off-by: David Martinez <47610359+dvdmrtnz@users.noreply.github.com>
This commit is contained in:
David Martinez 2023-12-26 12:53:40 +01:00 committed by Viktor Govako
parent 9fecf56e9e
commit 607ec7df6d
4 changed files with 3 additions and 10 deletions

View file

@ -88,7 +88,7 @@ public class SearchOnMapScreen extends BaseMapScreen implements NativeSearchList
{
final String title = result.getTitle(getCarContext());
builder.setTitle(title);
builder.addText(result.getFormattedDescription(getCarContext()));
builder.addText(result.description.description);
final CharSequence openingHours = SearchUiHelpers.getOpeningHoursText(getCarContext(), result);
final CharSequence distance = SearchUiHelpers.getDistanceText(result);

View file

@ -135,7 +135,7 @@ public class SearchScreen extends BaseMapScreen implements SearchTemplate.Search
{
final String title = result.getTitle(getCarContext());
builder.setTitle(title);
builder.addText(result.getFormattedDescription(getCarContext()));
builder.addText(result.description.description);
final CharSequence openingHoursAndDistance = SearchUiHelpers.getOpeningHoursAndDistanceText(getCarContext(), result);
if (openingHoursAndDistance.length() != 0)
builder.addText(openingHoursAndDistance);

View file

@ -137,7 +137,7 @@ class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHol
setBackground();
formatOpeningHours(mResult);
UiUtils.setTextAndHideIfEmpty(mDescription, mResult.getFormattedDescription(mFrame.getContext()));
UiUtils.setTextAndHideIfEmpty(mDescription, mResult.description.description);
UiUtils.setTextAndHideIfEmpty(mRegion, mResult.description.region);
UiUtils.setTextAndHideIfEmpty(mDistance, mResult.description.distance.toString(mFrame.getContext()));
}

View file

@ -145,11 +145,4 @@ public class SearchResult
return builder;
}
// FIXME: Better format based on result type
@NonNull
public CharSequence getFormattedDescription(@NonNull Context context)
{
return description.description;
}
}