[fix]Acanthusのaid保持処理を修正
1 parent 42eb57e commit 6aadc06547787d0f424d16741c1509adbf50642f
k-fujii authored on 13 Jul 2021
Showing 1 changed file
View
20
app/src/main/java/org/ntlab/acanthus_client/Acanthus.java
return preferenceToken;
}
 
public Integer getAid() {
if (this.aid == null) this.aid = 1111;
if (aid == null) {
SharedPreferences preferences = getSharedPreferences("prefData", MODE_PRIVATE);
aid = preferences.getInt("aid", 0);
}
return aid;
}
 
public Animation getCurrentAnimation() {
return currentAnimation;
}
 
public Collection<AnimationJson> getAnimationJsonList(){
public Collection<AnimationJson> getAnimationJsonList() {
return animationJsonList;
}
 
//-----------------------------------------------------------------
editor.commit();
}
 
public void setAid(Integer aid) {
this.aid = aid;
SharedPreferences preferences = getSharedPreferences("prefData", MODE_PRIVATE);
SharedPreferences.Editor editor = preferences.edit();
editor.putInt("aid", aid);
editor.commit();
}
 
public void setCurrentAnimation(Animation currentAnimation) {
this.currentAnimation = currentAnimation;
}
 
//HomeViewModelでしようするためのsetter
public void setAnimationJsonList(Collection<AnimationJson> sentAnimationJsonList){
public void setAnimationJsonList(Collection<AnimationJson> sentAnimationJsonList) {
this.animationJsonList.clear();
this.animationJsonList.addAll(sentAnimationJsonList);
}