chore: disable polls in bot DMs, fix avatar defaults (#5623)

This commit is contained in:
ggurdin 2026-02-10 10:59:32 -05:00 committed by GitHub
parent e657466303
commit 4994b75c33
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 34 additions and 13 deletions

View file

@ -87,21 +87,25 @@ class PangeaChatInputRow extends StatelessWidget {
onSelected: controller.onAddPopupMenuButtonSelected, onSelected: controller.onAddPopupMenuButtonSelected,
itemBuilder: (BuildContext context) => itemBuilder: (BuildContext context) =>
<PopupMenuEntry<AddPopupMenuActions>>[ <PopupMenuEntry<AddPopupMenuActions>>[
PopupMenuItem( if (!isBotDM)
value: AddPopupMenuActions.poll, PopupMenuItem(
child: ListTile( value: AddPopupMenuActions.poll,
leading: CircleAvatar( child: ListTile(
backgroundColor: theme leading: CircleAvatar(
.colorScheme backgroundColor: theme
.onPrimaryContainer, .colorScheme
foregroundColor: .onPrimaryContainer,
theme.colorScheme.primaryContainer, foregroundColor: theme
child: const Icon(Icons.poll_outlined), .colorScheme
.primaryContainer,
child: const Icon(
Icons.poll_outlined,
),
),
title: Text(L10n.of(context).startPoll),
contentPadding: const EdgeInsets.all(0),
), ),
title: Text(L10n.of(context).startPoll),
contentPadding: const EdgeInsets.all(0),
), ),
),
if (!isBotDM) if (!isBotDM)
PopupMenuItem<AddPopupMenuActions>( PopupMenuItem<AddPopupMenuActions>(
value: AddPopupMenuActions.file, value: AddPopupMenuActions.file,

View file

@ -94,6 +94,23 @@ class Avatar extends StatelessWidget {
useRive: useRive, useRive: useRive,
) )
// #Pangea // #Pangea
: noPic
? Container(
decoration: BoxDecoration(
color: backgroundColor ?? name?.lightColorAvatar,
),
alignment: Alignment.center,
child: Text(
fallbackLetters,
textAlign: TextAlign.center,
style: TextStyle(
fontFamily: 'RobotoMono',
color: textColor ?? Colors.white,
fontWeight: FontWeight.bold,
fontSize: (size / 2.5).roundToDouble(),
),
),
)
: !(mxContent.toString().startsWith('mxc://')) : !(mxContent.toString().startsWith('mxc://'))
? ImageByUrl( ? ImageByUrl(
imageUrl: mxContent, imageUrl: mxContent,