diff --git a/CHANGELOG.md b/CHANGELOG.md index f514b7b39..58e33697e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,8 +8,13 @@ - Added initial inbox feature to see your replies, mentions, and private messages - Added about page with links to lemmy and github repository +### Changed +- Adjusted size of create comment bottom modal, and enabled text selection within the modal for the parent's comment +- Slight improvements to account/profile selection to show which profile is currently active + ### Fixed - Potentially fixed issue where scrolling behaviour is weird when creating a new post or comment +- Fixed issue where usernames/passwords containing leading or trailing spaces may fail to login - contribution from @MrAntonS ## 0.2.1+5 - 2023-06-22 ### Added diff --git a/lib/account/widgets/profile_modal_body.dart b/lib/account/widgets/profile_modal_body.dart index 276ab9a28..d96a68a87 100644 --- a/lib/account/widgets/profile_modal_body.dart +++ b/lib/account/widgets/profile_modal_body.dart @@ -57,7 +57,9 @@ class ProfileSelect extends StatelessWidget { @override Widget build(BuildContext context) { + final theme = Theme.of(context); String? currentAccountId = context.read().state.preferences?.getString('active_profile_id'); + return FutureBuilder( future: fetchAccounts(), builder: (context, snapshot) { @@ -77,8 +79,14 @@ class ProfileSelect extends StatelessWidget { ); } else { return ListTile( - leading: const Icon(Icons.person), - title: Text(snapshot.data![index].username ?? 'N/A'), + leading: Icon( + Icons.person, + color: currentAccountId == snapshot.data![index].id ? Colors.amber : null, + ), + title: Text( + snapshot.data![index].username ?? 'N/A', + style: theme.textTheme.titleMedium?.copyWith(), + ), subtitle: Text(snapshot.data![index].instance?.replaceAll('https://', '') ?? 'N/A'), onTap: (currentAccountId == snapshot.data![index].id) ? null @@ -86,15 +94,20 @@ class ProfileSelect extends StatelessWidget { context.read().add(SwitchAccount(accountId: snapshot.data![index].id)); context.pop(); }, - trailing: IconButton( - icon: const Icon( - Icons.delete, - semanticLabel: 'Remove Account', - ), - onPressed: () { - context.read().add(RemoveAccount(accountId: snapshot.data![index].id)); - context.pop(); - }), + trailing: (currentAccountId == snapshot.data![index].id) + ? const InputChip( + label: Text('Active'), + visualDensity: VisualDensity.compact, + ) + : IconButton( + icon: const Icon( + Icons.delete, + semanticLabel: 'Remove Account', + ), + onPressed: () { + context.read().add(RemoveAccount(accountId: snapshot.data![index].id)); + context.pop(); + }), ); } }, diff --git a/lib/inbox/pages/inbox_page.dart b/lib/inbox/pages/inbox_page.dart index c7a45986c..ef231f275 100644 --- a/lib/inbox/pages/inbox_page.dart +++ b/lib/inbox/pages/inbox_page.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:auto_size_text/auto_size_text.dart'; import 'package:flutter_bloc/flutter_bloc.dart'; +import 'package:thunder/core/auth/bloc/auth_bloc.dart'; import 'package:thunder/inbox/bloc/inbox_bloc.dart'; import 'package:thunder/inbox/widgets/inbox_mentions_view.dart'; @@ -58,7 +59,10 @@ class _InboxPageState extends State { title: AutoSizeText('Inbox', style: theme.textTheme.titleLarge), actions: [ IconButton( - icon: const Icon(Icons.refresh_rounded), + icon: const Icon( + Icons.refresh_rounded, + semanticLabel: 'Refresh', + ), onPressed: () { context.read().add(const GetInboxEvent()); }, @@ -94,11 +98,21 @@ class _InboxPageState extends State { children: [ const SizedBox(height: 10), BlocBuilder(builder: (context, InboxState state) { + if (context.read().state.isLoggedIn == false) { + return const Text('Log in to see your inbox'); + } + switch (state.status) { case InboxStatus.initial: case InboxStatus.loading: case InboxStatus.refreshing: - return const CircularProgressIndicator(); + return const Center( + child: SizedBox( + width: 40, + height: 40, + child: CircularProgressIndicator(), + ), + ); case InboxStatus.success: if (_inboxType == InboxType.mentions) return const InboxMentionsView(); if (_inboxType == InboxType.messages) return const InboxPrivateMessagesView();