**Major Features Added:** - **Inline Reply System**: Replace compose screen with inline reply boxes - **Thread Navigation**: Parent/child navigation with jump functionality - **Chain Flow UI**: Reply counts, expand/collapse animations, visual hierarchy - **Enhanced Animations**: Smooth transitions, hover effects, micro-interactions **Frontend Changes:** - **ThreadedCommentWidget**: Complete rewrite with animations and navigation - **ThreadNode Model**: Added parent references and descendant counting - **ThreadedConversationScreen**: Integrated navigation handlers - **PostDetailScreen**: Replaced with threaded conversation view - **ComposeScreen**: Added reply indicators and context - **PostActions**: Fixed visibility checks for chain buttons **Backend Changes:** - **API Route**: Added /posts/:id/thread endpoint - **Post Repository**: Include allow_chain and visibility fields in feed - **Thread Handler**: Support for fetching post chains **UI/UX Improvements:** - **Reply Context**: Clear indication when replying to specific posts - **Character Counting**: 500 character limit with live counter - **Visual Hierarchy**: Depth-based indentation and styling - **Smooth Animations**: SizeTransition, FadeTransition, hover states - **Chain Navigation**: Parent/child buttons with visual feedback **Technical Enhancements:** - **Animation Controllers**: Proper lifecycle management - **State Management**: Clean separation of concerns - **Navigation Callbacks**: Reusable navigation system - **Error Handling**: Graceful fallbacks and user feedback This creates a Reddit-style threaded conversation experience with smooth animations, inline replies, and intuitive navigation between posts in a chain.
63 lines
2.6 KiB
SQL
63 lines
2.6 KiB
SQL
-- Repair database URLs to use custom domains
|
|
-- This handles various URL formats and ensures consistency
|
|
|
|
-- 1. Fix image URLs that are just filenames (no domain)
|
|
UPDATE posts
|
|
SET image_url = 'https://img.gosojorn.com/' || image_url
|
|
WHERE image_url IS NOT NULL
|
|
AND image_url != ''
|
|
AND image_url NOT LIKE 'http%'
|
|
AND (image_url LIKE '%.jpg' OR image_url LIKE '%.jpeg' OR image_url LIKE '%.png' OR image_url LIKE '%.gif');
|
|
|
|
-- 2. Fix video URLs that are just filenames (no domain)
|
|
UPDATE posts
|
|
SET video_url = 'https://quips.gosojorn.com/' || video_url
|
|
WHERE video_url IS NOT NULL
|
|
AND video_url != ''
|
|
AND video_url NOT LIKE 'http%'
|
|
AND (video_url LIKE '%.mp4' OR video_url LIKE '%.mov' OR video_url LIKE '%.webm');
|
|
|
|
-- 3. Fix thumbnail URLs that are just filenames
|
|
UPDATE posts
|
|
SET thumbnail_url = 'https://img.gosojorn.com/' || thumbnail_url
|
|
WHERE thumbnail_url IS NOT NULL
|
|
AND thumbnail_url != ''
|
|
AND thumbnail_url NOT LIKE 'http%'
|
|
AND (thumbnail_url LIKE '%.jpg' OR thumbnail_url LIKE '%.jpeg' OR thumbnail_url LIKE '%.png');
|
|
|
|
-- 4. Fix profile avatars that are just filenames
|
|
UPDATE profiles
|
|
SET avatar_url = 'https://img.gosojorn.com/' || avatar_url
|
|
WHERE avatar_url IS NOT NULL
|
|
AND avatar_url != ''
|
|
AND avatar_url NOT LIKE 'http%'
|
|
AND (avatar_url LIKE '%.jpg' OR avatar_url LIKE '%.jpeg' OR avatar_url LIKE '%.png');
|
|
|
|
-- 5. Fix profile covers that are just filenames
|
|
UPDATE profiles
|
|
SET cover_url = 'https://img.gosojorn.com/' || cover_url
|
|
WHERE cover_url IS NOT NULL
|
|
AND cover_url != ''
|
|
AND cover_url NOT LIKE 'http%'
|
|
AND (cover_url LIKE '%.jpg' OR cover_url LIKE '%.jpeg' OR cover_url LIKE '%.png');
|
|
|
|
-- Verification queries
|
|
SELECT 'Posts with image URLs' as check_type, count(*) as count FROM posts WHERE image_url IS NOT NULL;
|
|
SELECT 'Posts with video URLs' as check_type, count(*) as count FROM posts WHERE video_url IS NOT NULL;
|
|
SELECT 'Posts with thumbnail URLs' as check_type, count(*) as count FROM posts WHERE thumbnail_url IS NOT NULL;
|
|
SELECT 'Profiles with avatars' as check_type, count(*) as count FROM profiles WHERE avatar_url IS NOT NULL;
|
|
SELECT 'Profiles with covers' as check_type, count(*) as count FROM profiles WHERE cover_url IS NOT NULL;
|
|
|
|
-- Show any remaining non-standard URLs
|
|
SELECT 'Non-standard image URLs' as type, image_url FROM posts
|
|
WHERE image_url IS NOT NULL
|
|
AND image_url NOT LIKE 'https://img.gosojorn.com/%'
|
|
AND image_url NOT LIKE 'https://quips.gosojorn.com/%'
|
|
LIMIT 5;
|
|
|
|
SELECT 'Non-standard video URLs' as type, video_url FROM posts
|
|
WHERE video_url IS NOT NULL
|
|
AND video_url NOT LIKE 'https://img.gosojorn.com/%'
|
|
AND video_url NOT LIKE 'https://quips.gosojorn.com/%'
|
|
LIMIT 5;
|