일목균형표 구름 미표시 버그 수정 (bullishVisible/bearishVisible 둘 다 false)

- isIchimokuCloudVisible: bullish/bearish 둘 다 false이면 DB 잘못된 저장값으로
  간주하고 구름을 표시 (하나만 false인 경우는 사용자 의도로 유지)
- _applyIchimokuCloudPlugin: 동일 로직으로 effectiveBullish/effectiveBearish 적용
  - config.hidden 체크로만 클라우드 데이터 초기화
  - isIchimokuCloudVisible 의존 제거

서버 DB에 cloudColors.bullishVisible=false, bearishVisible=false 가 잘못
저장된 경우에도 구름이 표시되도록 보호 로직 추가.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Macbook
2026-06-02 04:40:34 +09:00
parent 7272d58258
commit 5d96417c42
2 changed files with 19 additions and 4 deletions
+8 -1
View File
@@ -118,11 +118,18 @@ export function areIchimokuSpanLinesVisible(config: IndicatorConfig): boolean {
* 선행스팬 라인의 개별 표시 여부(plotVisibility)와 구름 표시는 독립적으로 동작.
* 서버 DB에 저장된 구버전 설정에서 plot3·plot4 가 false 여도 구름은 표시해야 하므로
* areIchimokuSpanLinesVisible 검사를 생략한다.
*
* bullishVisible/bearishVisible 이 둘 다 false 이면 DB 잘못된 저장값으로 간주하고
* 구름을 표시한다 (하나만 false 인 경우는 사용자 의도이므로 유지).
*/
export function isIchimokuCloudVisible(config: IndicatorConfig): boolean {
if (config.hidden === true) return false;
const colors = resolveIchimokuCloudColors(config.cloudColors);
return colors.bullishVisible !== false || colors.bearishVisible !== false;
const bullishVis = colors.bullishVisible !== false;
const bearishVis = colors.bearishVisible !== false;
// 둘 다 false → DB 잘못된 저장값, 기본값으로 복원 간주 → 표시
if (!bullishVis && !bearishVis) return true;
return bullishVis || bearishVis;
}
export function resolveIchimokuCloudColors(