remove image and video buttons, file for them all

This commit is contained in:
OfficialDakari 2025-06-09 15:49:00 +05:00
parent d3d75252ee
commit 0c7e9a132e
3 changed files with 26 additions and 32 deletions

View File

@ -1212,12 +1212,6 @@ class ChatController extends State<ChatPageWithRoom>
if (choice == 'file') {
sendFileAction();
}
if (choice == 'image') {
sendFileAction(type: FileSelectorType.images);
}
if (choice == 'video') {
sendFileAction(type: FileSelectorType.videos);
}
if (choice == 'camera') {
openCameraAction();
}

View File

@ -152,30 +152,30 @@ class ChatInputRow extends StatelessWidget {
contentPadding: const EdgeInsets.all(0),
),
),
PopupMenuItem<String>(
value: 'image',
child: ListTile(
leading: CircleAvatar(
backgroundColor: theme.colorScheme.onPrimaryContainer,
foregroundColor: theme.colorScheme.primaryContainer,
child: const Icon(Icons.photo_outlined),
),
title: Text(L10n.of(context).sendImage),
contentPadding: const EdgeInsets.all(0),
),
),
PopupMenuItem<String>(
value: 'video',
child: ListTile(
leading: CircleAvatar(
backgroundColor: theme.colorScheme.onPrimaryContainer,
foregroundColor: theme.colorScheme.primaryContainer,
child: const Icon(Icons.video_camera_back_outlined),
),
title: Text(L10n.of(context).sendVideo),
contentPadding: const EdgeInsets.all(0),
),
),
// PopupMenuItem<String>(
// value: 'image',
// child: ListTile(
// leading: CircleAvatar(
// backgroundColor: theme.colorScheme.onPrimaryContainer,
// foregroundColor: theme.colorScheme.primaryContainer,
// child: const Icon(Icons.photo_outlined),
// ),
// title: Text(L10n.of(context).sendImage),
// contentPadding: const EdgeInsets.all(0),
// ),
// ),
// PopupMenuItem<String>(
// value: 'video',
// child: ListTile(
// leading: CircleAvatar(
// backgroundColor: theme.colorScheme.onPrimaryContainer,
// foregroundColor: theme.colorScheme.primaryContainer,
// child: const Icon(Icons.video_camera_back_outlined),
// ),
// title: Text(L10n.of(context).sendVideo),
// contentPadding: const EdgeInsets.all(0),
// ),
// ),
PopupMenuItem<String>(
value: 'file',
child: ListTile(

View File

@ -1153,8 +1153,8 @@ packages:
matrix:
dependency: "direct main"
description:
path: "/home/officialdakari/repos/matrix-dart-sdk"
relative: false
path: "../matrix-dart-sdk"
relative: true
source: path
version: "0.40.0"
meta: