mirror of
https://github.com/sudoxnym/habitica-android.git
synced 2026-07-14 18:21:57 +00:00
unequip gear
This commit is contained in:
parent
3a8b08fcd6
commit
ff5c8f0179
2 changed files with 7 additions and 1 deletions
|
|
@ -27,6 +27,7 @@ private List<ItemData> gearList;
|
|||
public String equippedGear;
|
||||
public Boolean isCostume;
|
||||
public String userSize;
|
||||
public String type;
|
||||
|
||||
public void setGearList(List<ItemData> gearList) {
|
||||
this.gearList = gearList;
|
||||
|
|
@ -111,7 +112,11 @@ class GearViewHolder extends RecyclerView.ViewHolder implements View.OnClickList
|
|||
command.gear = this.gear;
|
||||
command.asCostume = isCostume;
|
||||
EventBus.getDefault().post(command);
|
||||
equippedGear = this.gear.key;
|
||||
if (this.gear.key.equals(equippedGear)) {
|
||||
equippedGear = type + "_base_0";
|
||||
} else {
|
||||
equippedGear = this.gear.key;
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ public class EquipmentDetailFragment extends BaseMainFragment {
|
|||
this.adapter.equippedGear = this.equippedGear;
|
||||
this.adapter.isCostume = this.isCostume;
|
||||
this.adapter.userSize = this.user.getPreferences().getSize();
|
||||
this.adapter.type = this.type;
|
||||
this.recyclerView.setLayoutManager(new LinearLayoutManager(activity));
|
||||
this.recyclerView.addItemDecoration(new DividerItemDecoration(getActivity(), DividerItemDecoration.VERTICAL_LIST));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue