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), icon: _localAdded ? const Icon(Icons.person_remove) : const Icon(Icons.person_add),
style: style, style: style,
onPressed: _loading ? null : () async { onPressed: _loading ? null : () async {
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Sorry, this feature is not yet available")));
return;
setState(() { setState(() {
_loading = true; _loading = true;
}); });

View file

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