Add comprehensive user profile viewer with full accessibility support

- Create ProfileDialog with threaded loading and tabbed interface
- Display user bio, profile fields, stats, and recent posts
- Implement Follow/Unfollow, Block/Unblock, Mute/Unmute actions
- Add ActivityPub API methods for social actions and account management
- Enable keyboard navigation in read-only bio text with TextInteractionFlags
- Replace TODO profile viewing with fully functional dialog
- Update documentation to reflect completed profile features

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Storm Dragon
2025-07-21 10:39:07 -04:00
parent 1391d0c66f
commit 684919f4ca
6 changed files with 667 additions and 19 deletions

View File

@@ -385,6 +385,65 @@ class ActivityPubClient:
endpoint = f'/api/v1/polls/{poll_id}/votes'
data = {'choices': choices}
return self._make_request('POST', endpoint, data=data)
def get_account_statuses(self, account_id: str, limit: int = 40,
max_id: Optional[str] = None, since_id: Optional[str] = None,
exclude_reblogs: bool = False, exclude_replies: bool = False,
only_media: bool = False, pinned: bool = False) -> List[Dict]:
"""Get account's statuses/posts"""
params = {'limit': limit}
if max_id:
params['max_id'] = max_id
if since_id:
params['since_id'] = since_id
if exclude_reblogs:
params['exclude_reblogs'] = 'true'
if exclude_replies:
params['exclude_replies'] = 'true'
if only_media:
params['only_media'] = 'true'
if pinned:
params['pinned'] = 'true'
endpoint = f'/api/v1/accounts/{account_id}/statuses'
return self._make_request('GET', endpoint, params=params)
def block_account(self, account_id: str) -> Dict:
"""Block an account"""
endpoint = f'/api/v1/accounts/{account_id}/block'
return self._make_request('POST', endpoint)
def unblock_account(self, account_id: str) -> Dict:
"""Unblock an account"""
endpoint = f'/api/v1/accounts/{account_id}/unblock'
return self._make_request('POST', endpoint)
def mute_account(self, account_id: str, notifications: bool = True) -> Dict:
"""Mute an account"""
endpoint = f'/api/v1/accounts/{account_id}/mute'
data = {'notifications': notifications}
return self._make_request('POST', endpoint, data=data)
def unmute_account(self, account_id: str) -> Dict:
"""Unmute an account"""
endpoint = f'/api/v1/accounts/{account_id}/unmute'
return self._make_request('POST', endpoint)
def get_blocked_accounts(self, limit: int = 40, max_id: Optional[str] = None) -> List[Dict]:
"""Get list of blocked accounts"""
params = {'limit': limit}
if max_id:
params['max_id'] = max_id
return self._make_request('GET', '/api/v1/blocks', params=params)
def get_muted_accounts(self, limit: int = 40, max_id: Optional[str] = None) -> List[Dict]:
"""Get list of muted accounts"""
params = {'limit': limit}
if max_id:
params['max_id'] = max_id
return self._make_request('GET', '/api/v1/mutes', params=params)
class AuthenticationError(Exception):