Explicitly disable non functional features

This commit is contained in:
Nutcake 2023-10-10 11:07:54 +02:00
parent 1bcebbacc8
commit 023ed9edc1
2 changed files with 6 additions and 0 deletions

View file

@ -50,6 +50,8 @@ class _UserListTileState extends State<UserListTile> {
icon: _localAdded ? const Icon(Icons.person_remove) : const Icon(Icons.person_add),
style: style,
onPressed: _loading ? null : () async {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Sorry, this feature is not yet available")));
return;
setState(() {
_loading = true;
});

View file

@ -336,6 +336,8 @@ class _MessageInputBarState extends State<MessageInputBar> {
(false, _) => IconButton(
key: const ValueKey("add-attachment-icon"),
onPressed: _isSending ? null : () {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Sorry, this feature is not yet available")));
return;
setState(() {
_attachmentPickerOpen = true;
});
@ -528,6 +530,8 @@ class _MessageInputBarState extends State<MessageInputBar> {
_recordingCancelled = true;
},
onTapDown: widget.disabled ? null : (_) async {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Sorry, this feature is not yet available")));
return;
HapticFeedback.vibrate();
final hadToAsk = await Permission.microphone.isDenied;
final hasPermission = !await _recorder.hasPermission();