chore: Follow up desktop message popupmenu

This commit is contained in:
Krille 2023-12-29 10:02:50 +01:00
parent fe00db3281
commit 504fccc98f
No known key found for this signature in database
GPG key ID: E067ECD60F1A0652
3 changed files with 16 additions and 22 deletions

View file

@ -343,10 +343,9 @@ class Message extends StatelessWidget {
}, },
); );
Widget container; Widget container;
if (event.hasAggregatedEvents(timeline, RelationshipTypes.reaction) || final showReceiptsRow =
displayTime || event.hasAggregatedEvents(timeline, RelationshipTypes.reaction);
selected || if (showReceiptsRow || displayTime || selected || displayReadMarker) {
displayReadMarker) {
container = Column( container = Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
crossAxisAlignment: crossAxisAlignment:
@ -379,7 +378,7 @@ class Message extends StatelessWidget {
), ),
), ),
row, row,
if (event.hasAggregatedEvents(timeline, RelationshipTypes.reaction)) if (showReceiptsRow)
Padding( Padding(
padding: EdgeInsets.only( padding: EdgeInsets.only(
top: 4.0, top: 4.0,
@ -454,8 +453,9 @@ class Message extends StatelessWidget {
child: container, child: container,
), ),
Positioned( Positioned(
left: 4, left: ownMessage ? null : 48,
bottom: 4, right: ownMessage ? 4 : null,
bottom: showReceiptsRow ? 28 : 0,
child: AnimatedScale( child: AnimatedScale(
duration: Duration( duration: Duration(
milliseconds: milliseconds:

View file

@ -13,7 +13,7 @@ class MessagePopupMenuButton extends StatelessWidget {
required this.event, required this.event,
required this.onReply, required this.onReply,
required this.onSelect, required this.onSelect,
this.height = 38, this.height = 32,
super.key, super.key,
}); });
@ -24,6 +24,7 @@ class MessagePopupMenuButton extends StatelessWidget {
height: height, height: height,
child: PopupMenuButton( child: PopupMenuButton(
iconSize: height / 2, iconSize: height / 2,
icon: const Icon(Icons.expand_more_outlined),
itemBuilder: (context) => [ itemBuilder: (context) => [
PopupMenuItem( PopupMenuItem(
onTap: onSelect, onTap: onSelect,

View file

@ -6,7 +6,6 @@ import 'package:flutter_typeahead/flutter_typeahead.dart';
import 'package:fluffychat/config/app_config.dart'; import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/config/themes.dart'; import 'package:fluffychat/config/themes.dart';
import 'package:fluffychat/pages/homeserver_picker/public_homeserver.dart'; import 'package:fluffychat/pages/homeserver_picker/public_homeserver.dart';
import 'package:fluffychat/utils/error_reporter.dart';
import 'package:fluffychat/utils/localized_exception_extension.dart'; import 'package:fluffychat/utils/localized_exception_extension.dart';
import 'homeserver_bottom_sheet.dart'; import 'homeserver_bottom_sheet.dart';
import 'homeserver_picker.dart'; import 'homeserver_picker.dart';
@ -33,19 +32,13 @@ class HomeserverAppBar extends StatelessWidget {
leading: const CircularProgressIndicator.adaptive(strokeWidth: 2), leading: const CircularProgressIndicator.adaptive(strokeWidth: 2),
title: Text(L10n.of(context)!.loadingPleaseWait), title: Text(L10n.of(context)!.loadingPleaseWait),
), ),
errorBuilder: (context, error) { errorBuilder: (context, error) => ListTile(
ErrorReporter(context, 'Unable to load homeservers').onErrorCallback( leading: const Icon(Icons.error_outlined),
error ?? Object(), title: Text(
StackTrace.current, error?.toLocalizedString(context) ??
); L10n.of(context)!.oopsSomethingWentWrong,
return ListTile( ),
leading: const Icon(Icons.error_outlined), ),
title: Text(
error?.toLocalizedString(context) ??
L10n.of(context)!.oopsSomethingWentWrong,
),
);
},
itemBuilder: (context, homeserver) => ListTile( itemBuilder: (context, homeserver) => ListTile(
title: Text(homeserver.name), title: Text(homeserver.name),
subtitle: homeserver.description == null subtitle: homeserver.description == null