mirror of
https://github.com/krille-chan/fluffychat
synced 2024-08-10 08:33:43 +00:00
chore: Follow up desktop message popupmenu
This commit is contained in:
parent
fe00db3281
commit
504fccc98f
3 changed files with 16 additions and 22 deletions
|
@ -343,10 +343,9 @@ class Message extends StatelessWidget {
|
|||
},
|
||||
);
|
||||
Widget container;
|
||||
if (event.hasAggregatedEvents(timeline, RelationshipTypes.reaction) ||
|
||||
displayTime ||
|
||||
selected ||
|
||||
displayReadMarker) {
|
||||
final showReceiptsRow =
|
||||
event.hasAggregatedEvents(timeline, RelationshipTypes.reaction);
|
||||
if (showReceiptsRow || displayTime || selected || displayReadMarker) {
|
||||
container = Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment:
|
||||
|
@ -379,7 +378,7 @@ class Message extends StatelessWidget {
|
|||
),
|
||||
),
|
||||
row,
|
||||
if (event.hasAggregatedEvents(timeline, RelationshipTypes.reaction))
|
||||
if (showReceiptsRow)
|
||||
Padding(
|
||||
padding: EdgeInsets.only(
|
||||
top: 4.0,
|
||||
|
@ -454,8 +453,9 @@ class Message extends StatelessWidget {
|
|||
child: container,
|
||||
),
|
||||
Positioned(
|
||||
left: 4,
|
||||
bottom: 4,
|
||||
left: ownMessage ? null : 48,
|
||||
right: ownMessage ? 4 : null,
|
||||
bottom: showReceiptsRow ? 28 : 0,
|
||||
child: AnimatedScale(
|
||||
duration: Duration(
|
||||
milliseconds:
|
||||
|
|
|
@ -13,7 +13,7 @@ class MessagePopupMenuButton extends StatelessWidget {
|
|||
required this.event,
|
||||
required this.onReply,
|
||||
required this.onSelect,
|
||||
this.height = 38,
|
||||
this.height = 32,
|
||||
super.key,
|
||||
});
|
||||
|
||||
|
@ -24,6 +24,7 @@ class MessagePopupMenuButton extends StatelessWidget {
|
|||
height: height,
|
||||
child: PopupMenuButton(
|
||||
iconSize: height / 2,
|
||||
icon: const Icon(Icons.expand_more_outlined),
|
||||
itemBuilder: (context) => [
|
||||
PopupMenuItem(
|
||||
onTap: onSelect,
|
||||
|
|
|
@ -6,7 +6,6 @@ import 'package:flutter_typeahead/flutter_typeahead.dart';
|
|||
import 'package:fluffychat/config/app_config.dart';
|
||||
import 'package:fluffychat/config/themes.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 'homeserver_bottom_sheet.dart';
|
||||
import 'homeserver_picker.dart';
|
||||
|
@ -33,19 +32,13 @@ class HomeserverAppBar extends StatelessWidget {
|
|||
leading: const CircularProgressIndicator.adaptive(strokeWidth: 2),
|
||||
title: Text(L10n.of(context)!.loadingPleaseWait),
|
||||
),
|
||||
errorBuilder: (context, error) {
|
||||
ErrorReporter(context, 'Unable to load homeservers').onErrorCallback(
|
||||
error ?? Object(),
|
||||
StackTrace.current,
|
||||
);
|
||||
return ListTile(
|
||||
leading: const Icon(Icons.error_outlined),
|
||||
title: Text(
|
||||
error?.toLocalizedString(context) ??
|
||||
L10n.of(context)!.oopsSomethingWentWrong,
|
||||
),
|
||||
);
|
||||
},
|
||||
errorBuilder: (context, error) => ListTile(
|
||||
leading: const Icon(Icons.error_outlined),
|
||||
title: Text(
|
||||
error?.toLocalizedString(context) ??
|
||||
L10n.of(context)!.oopsSomethingWentWrong,
|
||||
),
|
||||
),
|
||||
itemBuilder: (context, homeserver) => ListTile(
|
||||
title: Text(homeserver.name),
|
||||
subtitle: homeserver.description == null
|
||||
|
|
Loading…
Reference in a new issue