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,
|
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,
|
||||||
|
|
|
||||||
|
|
@ -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,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue