fix: 히어로에서 비는 올 때만 알리고, 칸 글씨는 단어 단위로 줄바꿈
- '2시간 동안 비 · 안 와요' 칸을 없애고 그 자리는 미세먼지·자외선·달로 채움 (rain_known 은 쓰는 곳이 없어 삭제) - '2시간 동안 안 / 와요'처럼 말 중간에서 끊기지 않게 break-keep
This commit is contained in:
1 parent
00716844c3
commit
f2fb3a7dd2
4 files changed
+10
-11
No files matched your search
@@ -30,7 +30,6 @@ class HeroInput:
|
||||
now: datetime
|
||||
night: bool
|
||||
rain_at: Optional[datetime] = None
|
||||
rain_known: bool = False
|
||||
air: Optional[AirGrade] = None
|
||||
uv: Optional[float] = None
|
||||
temp_min: Optional[float] = None
|
||||
@@ -69,9 +68,8 @@ def hero_stats(x: HeroInput) -> list[HeroStatItem]:
|
||||
if x.discomfort is not None and x.discomfort >= MUGGY:
|
||||
alerts.append(HeroStatItem("muggy", "muggy", "불쾌지수", f"{x.discomfort} · {_discomfort_label(x.discomfort)}", "warn"))
|
||||
|
||||
# 비는 올 때만 알린다 (안 온다는 칸은 두지 않음)
|
||||
fills: list[HeroStatItem] = []
|
||||
if x.rain_known and x.rain_at is None:
|
||||
fills.append(HeroStatItem("rain", "moon" if x.night else "sun", "2시간 동안 비", "안 와요"))
|
||||
if x.air is not None:
|
||||
fills.append(HeroStatItem("air", "vent", "미세먼지", GRADE_LABEL[x.air]))
|
||||
if not x.night and x.uv is not None:
|
||||
|
||||
Reference in new issue
Block a user