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AAa,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;aAC1E;YAED,IAAI,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,KAAK,CAAC,EAAE;gBACtC,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE;oBACnB,IAAI,CAAC,YAAY,CAAC,GAAG,EAAE;wBACnB,IAAI,CAAC,aAAa,CAAC,YAAY,EAAE,CAAC;wBAClC,IAAI,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;oBAC/B,CAAC,CAAC,CAAC;gBACP,CAAC,CAAC,CAAC;aACN;QACL,CAAC;KACJ,CAAA;IAvCG;QADC,QAAQ,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;mEACoB;IAG1C;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;8DACuB;IAGzC;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;8DACsB;IAT/B,sBAAsB;QAFlC,OAAO;QACP,mCAAU,CAAC,2CAAsB,CAAC;OACtB,sBAAsB,CA0ClC;IAAD,6BAAC;KAAA;AA1CY,wDAAsB","file":"","sourceRoot":"/","sourcesContent":["import { ListSubviewImpl } from \"../../../baseview/impl/ListSubviewImpl\";\nimport { DatingEventItemProps, DatingEventSubviewProps, DatingEventSubviewType } from \"../../type/DatingEventSubview\";\nimport { DatingEventItemViewImpl } from \"./DatingEventItemViewImpl\";\nimport { RegSubview } from \"../../../PresenterCCViewFactory\";\nimport { DummyNode } from \"../../../../../common/CCDummyObjects\";\n\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\n@RegSubview(DatingEventSubviewType)\nexport class DatingEventSubviewImpl extends ListSubviewImpl<DatingEventItemProps, DatingEventSubviewProps> {\n //#region editor bindings\n @property([cc.Prefab])\n private listItemPrefabs: cc.Prefab[] = [];\n\n @property(cc.Node)\n private listSuffix?: cc.Node = undefined;\n\n @property(cc.Node)\n private noDataNode: cc.Node = DummyNode;\n //#endregion\n\n onLoad() {\n super.onLoad();\n this.bindProp(\"items\", (value) => {\n this.noDataNode.active = !value.length;\n if (this.listSuffix) {\n this.listSuffix.active = !!value.length;\n }\n });\n }\n\n protected createListItemView(index: number) {\n let prefab = this.listItemPrefabs[index % this.listItemPrefabs.length];\n let node = cc.instantiate(prefab);\n return Promise.resolve(node.getComponent(DatingEventItemViewImpl));\n }\n\n onRefreshListEnd() {\n if (this.listSuffix) {\n this.listSuffix.setSiblingIndex(this.contentLayout.node.childrenCount);\n }\n\n if (this.name.indexOf(\"MainEvent\") === 0) {\n this.scheduleOnce(() => {\n this.scheduleOnce(() => { // 延迟两帧更新布局\n this.contentLayout.updateLayout();\n this.scrollToBottom(false);\n });\n });\n }\n }\n}"]}