Merge branch 'main' of 47.107.44.202:xionglijia/18xchat
This commit is contained in:
@@ -526,9 +526,6 @@ export class ChatModel {
|
||||
//return false;
|
||||
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||
const roleData = this.rolesData.get(this.currentGirlId);
|
||||
return girlData.isCanChat(
|
||||
roleData.categoryId,
|
||||
roleData.girlId
|
||||
);
|
||||
return girlData.isCanChat(roleData.categoryId, roleData.girlId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -96,7 +96,13 @@ export class PastGirlListPanel extends li_BaseView {
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (isSame) return;
|
||||
if (isSame) {
|
||||
//相同 那就只刷新聊天时间,不刷新item
|
||||
for (let i = 0; i < this.cache.length; i++) {
|
||||
this.cache[i].refreshSimple();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.cacheIds = ids;
|
||||
|
||||
|
||||
@@ -78,7 +78,25 @@ export class PastGirlListItem extends Component {
|
||||
);
|
||||
}
|
||||
|
||||
refreshData(girlId: number, baseNode: Node): number {
|
||||
refreshSimple() {
|
||||
// 显示星级(好感度)
|
||||
const girlData = DataManager.I.getDataById<GirlData>(DataId.Girl);
|
||||
|
||||
const star = girlData.getStar(this.category.toString(), this.id);
|
||||
for (let i = 0; i < this.stars.length; i++) {
|
||||
const element = this.stars[i];
|
||||
if (star > i) {
|
||||
ResManager.I.changeResourceSpriteFrame(element, "ui/common/heart");
|
||||
} else {
|
||||
ResManager.I.changeResourceSpriteFrame(
|
||||
element,
|
||||
"ui/common/heart_empty"
|
||||
);
|
||||
}
|
||||
}
|
||||
this.updateLastChatTime();
|
||||
}
|
||||
refreshData(girlId: number, baseNode: Node) {
|
||||
if (!this.stars) {
|
||||
this.stars = this.starParent.getComponentsInChildren(Sprite);
|
||||
}
|
||||
@@ -148,7 +166,7 @@ export class PastGirlListItem extends Component {
|
||||
}, 0);
|
||||
|
||||
// 显示最近聊天时间
|
||||
return this.updateLastChatTime();
|
||||
this.updateLastChatTime();
|
||||
}
|
||||
|
||||
private getLastChatTime(id: number): number | null {
|
||||
|
||||
Reference in New Issue
Block a user