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,
itemBuilder: (BuildContext context) =>
<PopupMenuEntry<AddPopupMenuActions>>[
PopupMenuItem(
value: AddPopupMenuActions.poll,
child: ListTile(
leading: CircleAvatar(
backgroundColor: theme
.colorScheme
.onPrimaryContainer,
foregroundColor:
theme.colorScheme.primaryContainer,
child: const Icon(Icons.poll_outlined),
if (!isBotDM)
PopupMenuItem(
value: AddPopupMenuActions.poll,
child: ListTile(
leading: CircleAvatar(
backgroundColor: theme
.colorScheme
.onPrimaryContainer,
foregroundColor: theme
.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)
PopupMenuItem<AddPopupMenuActions>(
value: AddPopupMenuActions.file,

View file

@ -94,6 +94,23 @@ class Avatar extends StatelessWidget {
useRive: useRive,
)
// #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://'))
? ImageByUrl(
imageUrl: mxContent,