Skip to content

Commit 4f2b1a9

Browse files
authored
fix: 온도 히스토리 텍스트 형식 수정 (#169)
- userName이 "우리 가족"일 때 "님"을 붙이지 않도록 수정 - item.contributed가 음수인 경우 "하강시켰어요"로 표시
1 parent b912dcb commit 4f2b1a9

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

frontend/ongi/lib/screens/home/home_degree_graph.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,8 @@ class _HomeDegreeGraph extends State<HomeDegreeGraph> {
249249

250250
// 경계값에서 약간 안쪽으로만 필터링
251251
final smallMargin = horizontalInterval * 0.1;
252-
if ((value - minY).abs() < smallMargin || (value - maxY).abs() < smallMargin) {
252+
if ((value - minY).abs() < smallMargin ||
253+
(value - maxY).abs() < smallMargin) {
253254
return const SizedBox.shrink();
254255
}
255256

@@ -373,7 +374,7 @@ class _HomeDegreeGraph extends State<HomeDegreeGraph> {
373374
const SizedBox(width: 8),
374375
Expanded(
375376
child: Text(
376-
"${item.userName}${item.formattedChange} 상승 시켰어요!",
377+
"${item.userName}${item.userName == '우리 가족' ? '이' : ' 님이'} ${item.formattedChange} ${item.contributed >= 0 ? '상승' : '하강'}시켰어요!",
377378
style: const TextStyle(
378379
color: Colors.grey,
379380
fontSize: 15,

0 commit comments

Comments
 (0)