message fix
This commit is contained in:
parent
d5ce47c82c
commit
dc380a9777
@ -240,10 +240,19 @@ class MessagesPageState extends State<MessagesPage>
|
||||
Future<void> showSendMessageSheet(BuildContext context) async {
|
||||
await messageProvider.fetchAllRecipients();
|
||||
|
||||
List<SendRecipient> rs = [];
|
||||
|
||||
List<int> add = [];
|
||||
for (var r in messageProvider.recipients) {
|
||||
if (!add.contains(r.id)) {
|
||||
rs.add(r);
|
||||
add.add(r.id ?? 0);
|
||||
}
|
||||
}
|
||||
|
||||
_scaffoldKey.currentState?.showBottomSheet(
|
||||
(context) => RoundedBottomSheet(
|
||||
borderRadius: 14.0,
|
||||
child: SendMessageSheet(messageProvider.recipients)),
|
||||
(context) =>
|
||||
RoundedBottomSheet(borderRadius: 14.0, child: SendMessageSheet(rs)),
|
||||
backgroundColor: const Color(0x00000000),
|
||||
elevation: 12.0,
|
||||
);
|
||||
|
@ -58,7 +58,8 @@ class SendMessageSheetState extends State<SendMessageSheet> {
|
||||
.map((item) => DropdownMenuItem<String>(
|
||||
value: item.kretaId.toString(),
|
||||
child: Text(
|
||||
"${item.name ?? (item.id ?? 'Nincs név').toString()}${item.type.code != 'TANAR' ? " (${item.type.shortName})" : ''}",
|
||||
// "${item.name ?? (item.id ?? 'Nincs név').toString()} ${item.type.code} ${item.type.code != 'TANAR' ? " (${item.type.shortName})" : ''}",
|
||||
item.name ?? (item.id ?? 'Nincs név').toString(),
|
||||
style: TextStyle(
|
||||
fontSize: 14,
|
||||
fontWeight: FontWeight.bold,
|
||||
|
Loading…
x
Reference in New Issue
Block a user