dxh 5 jaren geleden
bovenliggende
commit
654911360c
1 gewijzigde bestanden met toevoegingen van 6 en 4 verwijderingen
  1. 6 4
      app/src/main/java/com/electric/chargingpile/fragment/TalkRecommendFragment.java

+ 6 - 4
app/src/main/java/com/electric/chargingpile/fragment/TalkRecommendFragment.java

@ -173,11 +173,11 @@ public class TalkRecommendFragment extends Fragment implements View.OnClickListe
173 173
                                public void accept(List<TalkRecommendBean> list) throws Exception {
174 174
                                    TalkRecommendBean talkRecommendBean = talkRecommendBeans.get(pos);
175 175
176
                                    int index =0;
176
                                    int index = 0;
177 177
                                    for (int i = 0; i < list.size(); i++) {
178 178
                                        TalkRecommendBean tmp = list.get(i);
179
                                        if(tmp.targetType == talkRecommendBean.targetType &&
180
                                        tmp.targetId ==talkRecommendBean.targetId){
179
                                        if (tmp.targetType == talkRecommendBean.targetType &&
180
                                                tmp.targetId == talkRecommendBean.targetId) {
181 181
                                            index = i;
182 182
                                            break;
183 183
                                        }
@ -272,7 +272,9 @@ public class TalkRecommendFragment extends Fragment implements View.OnClickListe
272 272
                    xRefreshView.stopRefresh();
273 273
                else
274 274
                    xRefreshView.setLoadComplete(true);
275
                ToastUtil.showToast(getActivity().getApplicationContext(), "加载失败,请重试", Toast.LENGTH_SHORT);
275
                if (getActivity() != null) {
276
                    ToastUtil.showToast(getActivity().getApplicationContext(), "加载失败,请重试", Toast.LENGTH_SHORT);
277
                }
276 278
            }
277 279
278 280
            @Override