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

Method loadLoopPlaybackPreference

js/ReadingSystem.js:749–759  ·  view source on GitHub ↗

* 加载循环播放偏好

()

Source from the content-addressed store, hash-verified

747 * 加载循环播放偏好
748 */
749 loadLoopPlaybackPreference() {
750 const stored = getStorage(this.config.STORAGE_KEYS.LOOP_MODE);
751 if (stored && this.config.LOOP_MODES.includes(stored)) {
752 this.state.loopMode = stored;
753 } else {
754 // 兼容旧版本
755 const oldVal = getStorage('loopPlaybackEnabled');
756 this.state.loopMode = oldVal === 'true' ? 'list' : 'off';
757 }
758 this.syncLoopPlayback();
759 }
760
761 /**
762 * 同步循环播放状态

Callers 1

initMethod · 0.95

Calls 2

syncLoopPlaybackMethod · 0.95
getStorageFunction · 0.90

Tested by

no test coverage detected