MCPcopy
hub / github.com/iChochy/NCE / init

Method init

js/ReadingSystem.js:67–81  ·  view source on GitHub ↗

* 初始化系统 * @returns {Promise }

()

Source from the content-addressed store, hash-verified

65 * @returns {Promise<void>}
66 */
67 async init() {
68 try {
69 await this.loadBooks();
70 await this.applyBookFromHash();
71 this.bindAllEvents();
72 this.loadLoopPlaybackPreference();
73 this.updateLoopPlaybackUI();
74 this.loadTranslationPreference();
75 this.updateTranslationToggle();
76 await this.loadUnitFromStorage();
77 } catch (error) {
78 console.error('Failed to initialize ReadingSystem:', error);
79 this.renderEmptyState(this.config.ERROR_MESSAGES.LOAD_BOOKS);
80 }
81 }
82
83 // =========================================================================
84 // 课本管理

Callers 1

constructorMethod · 0.95

Calls 9

loadBooksMethod · 0.95
applyBookFromHashMethod · 0.95
bindAllEventsMethod · 0.95
updateLoopPlaybackUIMethod · 0.95
loadUnitFromStorageMethod · 0.95
renderEmptyStateMethod · 0.95

Tested by

no test coverage detected