Fix color for light theme + fix a crash for search when no Internet connection

This commit is contained in:
tom79 2019-06-10 18:26:31 +02:00
parent 1fa11ba9d4
commit f2544e5668
2 changed files with 5 additions and 2 deletions

View File

@ -1009,7 +1009,7 @@ public class StatusListAdapter extends RecyclerView.Adapter implements OnPostAct
}
if (theme == Helper.THEME_LIGHT) {
// Todo: use the color 'custom_features_panel_background_light' for white theme
holder.fedilab_features_panel.setBackgroundColor(ContextCompat.getColor(context, R.color.custom_features_panel_background_light));
}
if( !status.iscached()){

View File

@ -186,7 +186,10 @@ public class DisplaySearchTagsFragment extends Fragment implements OnRetrieveSea
max_id = "0";
max_id = String.valueOf(Integer.valueOf(max_id) + 20);
lv_search_tags.setVisibility(View.VISIBLE);
List<String> newTags = apiResponse.getResults().getHashtags();
List<String> newTags = new ArrayList<>();
if( apiResponse.getResults() != null) {
newTags = apiResponse.getResults().getHashtags();
}
tags.addAll(newTags);
SearchTagsAdapter searchTagsAdapter = new SearchTagsAdapter(context, tags);
lv_search_tags.setAdapter(searchTagsAdapter);