dxh 5 years ago
parent
commit
654911360c

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

173
                                public void accept(List<TalkRecommendBean> list) throws Exception {
173
                                public void accept(List<TalkRecommendBean> list) throws Exception {
174
                                    TalkRecommendBean talkRecommendBean = talkRecommendBeans.get(pos);
174
                                    TalkRecommendBean talkRecommendBean = talkRecommendBeans.get(pos);
175
175
176
                                    int index =0;
176
                                    int index = 0;
177
                                    for (int i = 0; i < list.size(); i++) {
177
                                    for (int i = 0; i < list.size(); i++) {
178
                                        TalkRecommendBean tmp = list.get(i);
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
                                            index = i;
181
                                            index = i;
182
                                            break;
182
                                            break;
183
                                        }
183
                                        }
272
                    xRefreshView.stopRefresh();
272
                    xRefreshView.stopRefresh();
273
                else
273
                else
274
                    xRefreshView.setLoadComplete(true);
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
            @Override
280
            @Override