chore: Set text message max length to 16384 but make it configurable
This commit is contained in:
parent
1991707be7
commit
87a2449f41
2 changed files with 4 additions and 1 deletions
|
|
@ -37,6 +37,7 @@ abstract class SettingKeys {
|
|||
}
|
||||
|
||||
enum AppSettings<T> {
|
||||
textMessageMaxLength<int>('textMessageMaxLength', 16384),
|
||||
audioRecordingNumChannels<int>('audioRecordingNumChannels', 1),
|
||||
audioRecordingAutoGain<bool>('audioRecordingAutoGain', true),
|
||||
audioRecordingEchoCancel<bool>('audioRecordingEchoCancel', false),
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
import 'package:fluffychat/config/setting_keys.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/services.dart';
|
||||
|
||||
|
|
@ -437,7 +438,8 @@ class InputBar extends StatelessWidget {
|
|||
// it sets the types for the callback incorrectly
|
||||
onSubmitted!(text);
|
||||
},
|
||||
maxLength: 16384,
|
||||
maxLength:
|
||||
AppSettings.textMessageMaxLength.getItem(Matrix.of(context).store),
|
||||
decoration: decoration,
|
||||
onChanged: (text) {
|
||||
// fix for the library for now
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue