From fc38678fbdad0a75e03ea12fba511facc81fc0a1 Mon Sep 17 00:00:00 2001 From: caadiq Date: Sun, 29 Mar 2026 14:17:18 +0900 Subject: [PATCH] =?UTF-8?q?revert(app):=20X=20=EA=B2=8C=EC=8B=9C=EA=B8=80?= =?UTF-8?q?=20=ED=95=B4=EC=8B=9C=ED=83=9C=EA=B7=B8=20=ED=95=98=EC=9D=B4?= =?UTF-8?q?=EB=9D=BC=EC=9D=B4=ED=8A=B8=20=EC=A0=9C=EA=B1=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 4.6 (1M context) --- .../views/schedule/schedule_detail_view.dart | 70 ++----------------- 1 file changed, 6 insertions(+), 64 deletions(-) diff --git a/app/lib/views/schedule/schedule_detail_view.dart b/app/lib/views/schedule/schedule_detail_view.dart index a5d35fc..0e43323 100644 --- a/app/lib/views/schedule/schedule_detail_view.dart +++ b/app/lib/views/schedule/schedule_detail_view.dart @@ -499,8 +499,13 @@ class _ScheduleDetailViewState extends ConsumerState { // 본문 Padding( padding: const EdgeInsets.all(16), - child: _buildLinkedText( + child: Text( decodeHtmlEntities(schedule.content ?? schedule.title), + style: const TextStyle( + fontSize: 15, + height: 1.5, + color: AppColors.textPrimary, + ), ), ), // 이미지 @@ -686,69 +691,6 @@ class _ScheduleDetailViewState extends ConsumerState { ); } - /// 해시태그, URL을 감지해서 링크로 만드는 RichText - Widget _buildLinkedText(String text) { - // 해시태그 (#xxx) 또는 URL (https://...) 매칭 - final pattern = RegExp(r'(#[^\s#]+)|(https?://[^\s]+)'); - final spans = []; - int lastEnd = 0; - - for (final match in pattern.allMatches(text)) { - // 매치 앞의 일반 텍스트 - if (match.start > lastEnd) { - spans.add(TextSpan( - text: text.substring(lastEnd, match.start), - style: const TextStyle( - fontSize: 15, - height: 1.5, - color: AppColors.textPrimary, - ), - )); - } - - final matched = match.group(0)!; - final isHashtag = matched.startsWith('#'); - - final url = isHashtag - ? 'https://x.com/hashtag/${Uri.encodeComponent(matched.substring(1))}?src=hashtag_click' - : matched; - - spans.add(WidgetSpan( - alignment: PlaceholderAlignment.baseline, - baseline: TextBaseline.alphabetic, - child: GestureDetector( - onTap: () => _launchUrl(url), - child: Text( - matched, - style: TextStyle( - fontSize: 15, - height: 1.5, - color: AppColors.primary, - decoration: isHashtag ? TextDecoration.none : TextDecoration.underline, - decorationColor: AppColors.primary, - ), - ), - ), - )); - - lastEnd = match.end; - } - - // 남은 텍스트 - if (lastEnd < text.length) { - spans.add(TextSpan( - text: text.substring(lastEnd), - style: const TextStyle( - fontSize: 15, - height: 1.5, - color: AppColors.textPrimary, - ), - )); - } - - return RichText(text: TextSpan(children: spans)); - } - /// 인증 배지 Widget _buildVerifiedBadge() { return SizedBox(