@@ -873,13 +873,8 @@ private void UpdateClockPanelVisibility()
873873
874874 // ✅ ClockPanel이 표시될 조건 (쿼리 입력 없음 & ContextMenu, History가 닫혀 있음)
875875 bool shouldShowClock = QueryTextBox . Text . Length == 0 &&
876- ContextMenu . Visibility == Visibility . Collapsed &&
877- History . Visibility == Visibility . Collapsed ;
878-
879- // ✅ ClockPanel이 숨겨질 조건 (쿼리에 글자가 있거나, ContextMenu 또는 History가 열려 있음)
880- bool shouldHideClock = QueryTextBox . Text . Length > 0 ||
881- ContextMenu . Visibility == Visibility . Visible ||
882- History . Visibility != Visibility . Collapsed ;
876+ ContextMenu . Visibility != Visibility . Visible &&
877+ History . Visibility != Visibility . Visible ;
883878
884879 // ✅ 1. ContextMenu가 열리면 즉시 Visibility.Hidden으로 설정 (애니메이션 없이 강제 숨김)
885880 if ( ContextMenu . Visibility == Visibility . Visible )
@@ -890,15 +885,15 @@ private void UpdateClockPanelVisibility()
890885 }
891886
892887 // ✅ 2. ContextMenu가 닫혔을 때, 쿼리에 글자가 남아 있다면 Hidden 상태 유지 (이전 상태 기억)
893- if ( ContextMenu . Visibility == Visibility . Collapsed && QueryTextBox . Text . Length > 0 )
888+ if ( ContextMenu . Visibility != Visibility . Visible && QueryTextBox . Text . Length > 0 )
894889 {
895890 ClockPanel . Visibility = Visibility . Hidden ;
896891 ClockPanel . Opacity = 0.0 ;
897892 return ;
898893 }
899894
900895 // ✅ 3. ClockPanel을 숨기는 경우 (페이드아웃 애니메이션 적용)
901- if ( shouldHideClock && ClockPanel . Visibility == Visibility . Visible && ! _isClockPanelAnimating )
896+ if ( ( ! shouldShowClock ) && ClockPanel . Visibility == Visibility . Visible && ! _isClockPanelAnimating )
902897 {
903898 _isClockPanelAnimating = true ;
904899
0 commit comments