Skip to content

Commit

Permalink
extract constants
Browse files Browse the repository at this point in the history
  • Loading branch information
boyan01 committed Jul 26, 2024
1 parent 8348b3c commit be0b8ef
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/constants/constants.dart
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const statusOffset = 'messages_status_offset';

const kMarkLimit = 999;
const kDbDeleteLimit = 500;
const kMaxGroupParticipants = 1024;

const kMaxTextLength = 64 * 1024;
const kDefaultTextInputLimit = 200;
Expand Down
3 changes: 2 additions & 1 deletion lib/ui/home/chat_slide_page/group_participants_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:hooks_riverpod/hooks_riverpod.dart';
import 'package:mixin_bot_sdk_dart/mixin_bot_sdk_dart.dart';
import 'package:super_context_menu/super_context_menu.dart';

import '../../../constants/constants.dart';
import '../../../constants/icon_fonts.dart';
import '../../../constants/resources.dart';
import '../../../db/dao/participant_dao.dart';
Expand Down Expand Up @@ -352,7 +353,7 @@ class _ActionAddParticipants extends HookConsumerWidget {
singleSelect: false,
title: context.l10n.addParticipants,
onlyContact: true,
maxSelect: 1024 - participants.length,
maxSelect: kMaxGroupParticipants - participants.length,
);
if (result == null || result.isEmpty) return;

Expand Down

0 comments on commit be0b8ef

Please sign in to comment.