Skip to content

Commit

Permalink
Add community/user selector indicators (#1244)
Browse files Browse the repository at this point in the history
  • Loading branch information
micahmo authored Mar 28, 2024
1 parent a90fbcc commit 417259c
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 26 deletions.
56 changes: 31 additions & 25 deletions lib/community/pages/create_post_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -773,35 +773,41 @@ class _CommunitySelectorState extends State<CommunitySelector> {
child: Padding(
padding: const EdgeInsets.only(left: 8, top: 4, bottom: 4),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
CommunityAvatar(community: widget.communityView?.community, radius: 16),
const SizedBox(width: 12),
widget.communityId != null
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('${widget.communityView?.community.title} '),
CommunityFullNameWidget(
context,
widget.communityView?.community.name,
fetchInstanceNameFromUrl(widget.communityView?.community.actorId),
textStyle: theme.textTheme.bodySmall,
Row(
children: [
CommunityAvatar(community: widget.communityView?.community, radius: 16),
const SizedBox(width: 12),
widget.communityId != null
? Column(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Text('${widget.communityView?.community.title} '),
CommunityFullNameWidget(
context,
widget.communityView?.community.name,
fetchInstanceNameFromUrl(widget.communityView?.community.actorId),
textStyle: theme.textTheme.bodySmall,
)
],
)
],
)
: SizedBox(
height: 36,
child: Align(
alignment: Alignment.centerLeft,
child: Text(
l10n.selectCommunity,
style: theme.textTheme.bodyMedium?.copyWith(
fontStyle: FontStyle.italic,
color: theme.colorScheme.error,
: SizedBox(
height: 36,
child: Align(
alignment: Alignment.centerLeft,
child: Text(
l10n.selectCommunity,
style: theme.textTheme.bodyMedium?.copyWith(
fontStyle: FontStyle.italic,
color: theme.colorScheme.error,
),
),
),
),
),
),
],
),
const Icon(Icons.chevron_right_rounded),
],
),
),
Expand Down
8 changes: 7 additions & 1 deletion lib/user/widgets/user_selector.dart
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,13 @@ class _UserSelectorState extends State<UserSelector> {
},
child: const Padding(
padding: EdgeInsets.only(left: 8, top: 4, bottom: 4),
child: UserIndicator(),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
UserIndicator(),
Icon(Icons.chevron_right_rounded),
],
),
),
),
);
Expand Down

0 comments on commit 417259c

Please sign in to comment.