forked from organicmaps/organicmaps
[android][booking] review fixes
This commit is contained in:
parent
f9d2cd30d6
commit
3b75f4d0fa
3 changed files with 8 additions and 11 deletions
|
@ -41,7 +41,7 @@ class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHol
|
|||
private final SearchFragment mSearchFragment;
|
||||
private SearchData[] mResults;
|
||||
@NonNull
|
||||
private FilteredHotelIds mFilteredHotelIds = new FilteredHotelIds();
|
||||
private final FilteredHotelIds mFilteredHotelIds = new FilteredHotelIds();
|
||||
private final Drawable mClosedMarkerBackground;
|
||||
|
||||
static abstract class SearchDataViewHolder extends RecyclerView.ViewHolder
|
||||
|
@ -117,10 +117,9 @@ class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHol
|
|||
private static class FilteredHotelIds
|
||||
{
|
||||
@NonNull
|
||||
private SparseArray<Set<FeatureId>> mFilteredHotelIds =
|
||||
new SparseArray<>();
|
||||
private final SparseArray<Set<FeatureId>> mFilteredHotelIds = new SparseArray<>();
|
||||
|
||||
void set(@BookingFilter.Type int type, @NonNull FeatureId[] hotelsId)
|
||||
void put(@BookingFilter.Type int type, @NonNull FeatureId[] hotelsId)
|
||||
{
|
||||
mFilteredHotelIds.put(type, new HashSet<>(Arrays.asList(hotelsId)));
|
||||
}
|
||||
|
@ -431,10 +430,9 @@ class SearchAdapter extends RecyclerView.Adapter<SearchAdapter.SearchDataViewHol
|
|||
notifyDataSetChanged();
|
||||
}
|
||||
|
||||
void setFilteredHotels(@BookingFilter.Type int type,
|
||||
@NonNull FeatureId[] hotelsId)
|
||||
void setFilteredHotels(@BookingFilter.Type int type, @NonNull FeatureId[] hotelsId)
|
||||
{
|
||||
mFilteredHotelIds.set(type, hotelsId);
|
||||
mFilteredHotelIds.put(type, hotelsId);
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,7 +72,6 @@ Api const & FilterProcessor::GetApi() const
|
|||
|
||||
void FilterProcessor::ApplyConsecutively(search::Results const & results, TasksInternal & tasks)
|
||||
{
|
||||
// Run provided filters consecutively.
|
||||
for (size_t i = tasks.size() - 1; i > 0; --i)
|
||||
{
|
||||
auto const & cb = tasks[i - 1].m_filterParams.m_callback;
|
||||
|
|
|
@ -26,9 +26,9 @@ class Api;
|
|||
namespace filter
|
||||
{
|
||||
|
||||
struct CachedResut
|
||||
struct CachedResult
|
||||
{
|
||||
CachedResut(Type type, std::vector<FeatureID> && featuresSorted)
|
||||
CachedResult(Type type, std::vector<FeatureID> && featuresSorted)
|
||||
: m_type(type)
|
||||
, m_featuresSorted(featuresSorted)
|
||||
{
|
||||
|
@ -38,7 +38,7 @@ struct CachedResut
|
|||
std::vector<FeatureID> m_featuresSorted;
|
||||
};
|
||||
|
||||
using CachedResults = std::vector<CachedResut>;
|
||||
using CachedResults = std::vector<CachedResult>;
|
||||
|
||||
using FillSearchMarksCallback =
|
||||
platform::SafeCallback<void(CachedResults results)>;
|
||||
|
|
Loading…
Add table
Reference in a new issue