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:
@ -18,6 +18,7 @@ from widgets.login_dialog import LoginDialog
|
||||
from widgets.account_selector import AccountSelector
|
||||
from widgets.settings_dialog import SettingsDialog
|
||||
from widgets.soundpack_manager_dialog import SoundpackManagerDialog
|
||||
from widgets.profile_dialog import ProfileDialog
|
||||
from activitypub.client import ActivityPubClient
|
||||
|
||||
|
||||
@ -632,8 +633,49 @@ class MainWindow(QMainWindow):
|
||||
|
||||
def view_profile(self, post):
|
||||
"""View user profile"""
|
||||
# TODO: Implement profile viewing dialog
|
||||
self.status_bar.showMessage(f"Profile viewing not implemented yet: {post.account.display_name}", 3000)
|
||||
try:
|
||||
# Convert Post.account to User-compatible data and open profile dialog
|
||||
from models.user import User
|
||||
|
||||
# Create User object from Account data
|
||||
account = post.account
|
||||
account_data = {
|
||||
'id': account.id,
|
||||
'username': account.username,
|
||||
'acct': account.acct,
|
||||
'display_name': account.display_name,
|
||||
'note': account.note,
|
||||
'url': account.url,
|
||||
'avatar': account.avatar,
|
||||
'avatar_static': account.avatar_static,
|
||||
'header': account.header,
|
||||
'header_static': account.header_static,
|
||||
'locked': account.locked,
|
||||
'bot': account.bot,
|
||||
'discoverable': account.discoverable,
|
||||
'group': account.group,
|
||||
'created_at': account.created_at.isoformat() if account.created_at else None,
|
||||
'followers_count': account.followers_count,
|
||||
'following_count': account.following_count,
|
||||
'statuses_count': account.statuses_count,
|
||||
'fields': [], # Will be loaded from API
|
||||
'emojis': [] # Will be loaded from API
|
||||
}
|
||||
|
||||
user = User.from_api_dict(account_data)
|
||||
|
||||
dialog = ProfileDialog(
|
||||
user_id=user.id,
|
||||
account_manager=self.account_manager,
|
||||
sound_manager=self.timeline.sound_manager,
|
||||
initial_user=user,
|
||||
parent=self
|
||||
)
|
||||
dialog.exec()
|
||||
except Exception as e:
|
||||
self.status_bar.showMessage(f"Error opening profile: {str(e)}", 3000)
|
||||
if hasattr(self.timeline, 'sound_manager'):
|
||||
self.timeline.sound_manager.play_error()
|
||||
|
||||
def update_status_label(self):
|
||||
"""Update the status label with current account info"""
|
||||
|
Reference in New Issue
Block a user