mirror of
https://github.com/woheller69/solxpect.git
synced 2025-12-16 09:20:12 +01:00
fix potential rare crash
This commit is contained in:
parent
10f7c2f9f5
commit
02b78a99c9
1 changed files with 1 additions and 0 deletions
|
|
@ -311,6 +311,7 @@ public class CityWeatherAdapter extends RecyclerView.Adapter<CityWeatherAdapter.
|
|||
new RecyclerItemClickListener(context, holder.recyclerView, new RecyclerItemClickListener.OnItemClickListener() {
|
||||
@Override
|
||||
public void onItemClick(View view, int position) {
|
||||
if (position == -1) return;
|
||||
SQLiteHelper database = SQLiteHelper.getInstance(context.getApplicationContext());
|
||||
List<WeekForecast> weekforecasts = database.getWeekForecastsByCityId(generalDataList.getCity_id());
|
||||
long time = weekforecasts.get(position).getForecastTime(); //time of clicked week item
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue