|
@@ -27,10 +27,10 @@ import butterknife.OnClick;
|
|
|
*/
|
|
*/
|
|
|
public class HpRefreshWelfareHelper {
|
|
public class HpRefreshWelfareHelper {
|
|
|
|
|
|
|
|
-// private View hp_refresh_welfare_box;
|
|
|
|
|
|
|
+ private View hp_refresh_welfare_box;
|
|
|
|
|
|
|
|
public HpRefreshWelfareHelper(View hp_refresh_welfare_box) {
|
|
public HpRefreshWelfareHelper(View hp_refresh_welfare_box) {
|
|
|
-// this.hp_refresh_welfare_box = hp_refresh_welfare_box;
|
|
|
|
|
|
|
+ this.hp_refresh_welfare_box = hp_refresh_welfare_box;
|
|
|
ButterKnife.bind(this, hp_refresh_welfare_box);
|
|
ButterKnife.bind(this, hp_refresh_welfare_box);
|
|
|
initRefreshWelfareList();
|
|
initRefreshWelfareList();
|
|
|
}
|
|
}
|
|
@@ -52,18 +52,15 @@ public class HpRefreshWelfareHelper {
|
|
|
hp_refresh_welfare.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
|
|
hp_refresh_welfare.setLayoutManager(new LinearLayoutManager(SheepApp.getInstance()));
|
|
|
hp_refresh_welfare.setHasFixedSize(true);
|
|
hp_refresh_welfare.setHasFixedSize(true);
|
|
|
hp_refresh_welfare.setNestedScrollingEnabled(false);
|
|
hp_refresh_welfare.setNestedScrollingEnabled(false);
|
|
|
- hp_refresh_welfare.setAdapter(new AdpRefreshWelfare(R.layout.item_hp_refresh_welfare, refreshWelfareList).setChangeOne(new View.OnClickListener() {
|
|
|
|
|
- @Override
|
|
|
|
|
- public void onClick(View view) {
|
|
|
|
|
- refreshWelfareList.clear();
|
|
|
|
|
- ViewUtil.notifyDataSetChanged(hp_refresh_welfare);
|
|
|
|
|
- ViewUtil.delay2(new AbsObserver<Integer>(){
|
|
|
|
|
- @Override
|
|
|
|
|
- public void onNext(Integer o) {
|
|
|
|
|
- refreshData();
|
|
|
|
|
- }
|
|
|
|
|
- }, 100);
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ hp_refresh_welfare.setAdapter(new AdpRefreshWelfare(R.layout.item_hp_refresh_welfare, refreshWelfareList).setChangeOne(view -> {
|
|
|
|
|
+ refreshWelfareList.clear();
|
|
|
|
|
+ ViewUtil.notifyDataSetChanged(hp_refresh_welfare);
|
|
|
|
|
+ ViewUtil.delay2(new AbsObserver<Integer>(){
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onNext(Integer o) {
|
|
|
|
|
+ refreshData();
|
|
|
|
|
+ }
|
|
|
|
|
+ }, 100L);
|
|
|
}));
|
|
}));
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -76,7 +73,7 @@ public class HpRefreshWelfareHelper {
|
|
|
refreshWelfareList.add(commendTask.getM());
|
|
refreshWelfareList.add(commendTask.getM());
|
|
|
ViewUtil.notifyDataSetChanged(hp_refresh_welfare);
|
|
ViewUtil.notifyDataSetChanged(hp_refresh_welfare);
|
|
|
}
|
|
}
|
|
|
- ViewUtil.setVisibility(hp_game_welfare_entrance, commendTask != null);
|
|
|
|
|
|
|
+ ViewUtil.setVisibility(hp_refresh_welfare_box, commendTask != null);
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|