minor fixes

This commit is contained in:
Prince
2026-06-21 20:16:21 +02:00
parent b90d95bc63
commit 7de44de068
2 changed files with 6 additions and 6 deletions

View File

@@ -49,7 +49,10 @@ class _GroupCreateScreenState extends State<GroupCreateScreen> {
if (parts.length >= 2) {
final name = parts[0].trim();
final account = parts[1].trim();
final phone = parts[2].trim();
String phone = '';
if (parts.length > 2) {
phone = parts.sublist(2).join(',').trim();
}
if (name.isNotEmpty && account.isNotEmpty) {
members.add(
Recipient(
@@ -96,10 +99,7 @@ class _GroupCreateScreenState extends State<GroupCreateScreen> {
AppSnackBar.showSuccess(context, 'Group created successfully.');
context.pop(true); // Return true to indicate a new group was created
} else {
AppSnackBar.showError(
context,
result.error ?? 'Failed to create group.',
);
AppSnackBar.showError(context, result.error ?? 'Failed to create group.');
}
}

View File

@@ -678,7 +678,7 @@ class _PayScreenState extends State<PayScreen> with TickerProviderStateMixin {
onChanged: (String? newValue) {
if (newValue != null) {
BillProduct product = controller.model.products.firstWhere(
(e) => e.uid == newValue,
(e) => e.name == newValue,
);
controller.updateSelectedProduct(product);
}