chore: disable polls in bot DMs, fix avatar defaults (#5623)
This commit is contained in:
parent
e657466303
commit
4994b75c33
2 changed files with 34 additions and 13 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue