b28f5f1c-5086-4e99-9280-0d825b9ee9b5.js 2.82 KB
"use strict";
cc._RF.push(module, 'b28f58cUIZOmZKADYJbnum1', 'ExtraPlotDatingEventSubViewImpl');
// script/game/ui/view/impl/dating/ExtraPlotDatingEventSubViewImpl.ts

"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ExtraPlotDatingEventSubViewImpl = void 0;
const ListSubviewImpl_1 = require("../../../baseview/impl/ListSubviewImpl");
const ExtraPlotDatingEventSubView_1 = require("../../type/ExtraPlotDatingEventSubView");
const DatingEventItemViewImpl_1 = require("./DatingEventItemViewImpl");
const PresenterCCViewFactory_1 = require("../../../PresenterCCViewFactory");
const CCDummyObjects_1 = require("../../../../../common/CCDummyObjects");
const { ccclass, property } = cc._decorator;
let ExtraPlotDatingEventSubViewImpl = /** @class */ (() => {
    let ExtraPlotDatingEventSubViewImpl = class ExtraPlotDatingEventSubViewImpl extends ListSubviewImpl_1.ListSubviewImpl {
        constructor() {
            super(...arguments);
            this.extraPlotListItemPrefab = CCDummyObjects_1.DummyPrefab;
            this.getItemNode = (k) => {
                let ret = undefined;
                let v = this._itemViews[k];
                if (v) {
                    ret = v.node;
                }
                return ret;
            };
        }
        onLoad() {
            super.onLoad();
        }
        createListItemView(index) {
            let node = cc.instantiate(this.extraPlotListItemPrefab);
            return Promise.resolve(node.getComponent(DatingEventItemViewImpl_1.DatingEventItemViewImpl));
        }
        onRefreshListEnd() {
            this.scheduleOnce(() => {
                this.scheduleOnce(() => {
                    this.contentLayout.updateLayout();
                    this.scrollToTop();
                });
            });
        }
    };
    __decorate([
        property(cc.Prefab)
    ], ExtraPlotDatingEventSubViewImpl.prototype, "extraPlotListItemPrefab", void 0);
    ExtraPlotDatingEventSubViewImpl = __decorate([
        ccclass,
        PresenterCCViewFactory_1.RegSubview(ExtraPlotDatingEventSubView_1.ExtraPlotDatingEventSubViewType)
    ], ExtraPlotDatingEventSubViewImpl);
    return ExtraPlotDatingEventSubViewImpl;
})();
exports.ExtraPlotDatingEventSubViewImpl = ExtraPlotDatingEventSubViewImpl;

cc._RF.pop();