diff --git a/lib/pangea/chat/widgets/pangea_chat_input_row.dart b/lib/pangea/chat/widgets/pangea_chat_input_row.dart index 1543e9232..7dcb3981f 100644 --- a/lib/pangea/chat/widgets/pangea_chat_input_row.dart +++ b/lib/pangea/chat/widgets/pangea_chat_input_row.dart @@ -87,21 +87,25 @@ class PangeaChatInputRow extends StatelessWidget { onSelected: controller.onAddPopupMenuButtonSelected, itemBuilder: (BuildContext context) => >[ - 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( value: AddPopupMenuActions.file, diff --git a/lib/widgets/avatar.dart b/lib/widgets/avatar.dart index 7e1975a1c..f9b27cfec 100644 --- a/lib/widgets/avatar.dart +++ b/lib/widgets/avatar.dart @@ -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,