context menu pc fix
This commit is contained in:
@@ -744,7 +744,7 @@ class _ChatsScreenState extends State<ChatsScreen>
|
||||
fontSize: 16,
|
||||
),
|
||||
),
|
||||
const Spacer(),
|
||||
/*const Spacer(),
|
||||
IconButton(
|
||||
icon: const Icon(Icons.search, size: 20),
|
||||
onPressed: () {
|
||||
@@ -755,7 +755,7 @@ class _ChatsScreenState extends State<ChatsScreen>
|
||||
);
|
||||
},
|
||||
tooltip: 'Поиск каналов',
|
||||
),
|
||||
),*/
|
||||
],
|
||||
),
|
||||
),
|
||||
@@ -994,7 +994,7 @@ class _ChatsScreenState extends State<ChatsScreen>
|
||||
},
|
||||
),
|
||||
|
||||
ListTile(
|
||||
/*ListTile(
|
||||
leading: CircleAvatar(
|
||||
backgroundColor: Theme.of(
|
||||
context,
|
||||
@@ -1014,7 +1014,7 @@ class _ChatsScreenState extends State<ChatsScreen>
|
||||
),
|
||||
);
|
||||
},
|
||||
),
|
||||
),*/
|
||||
|
||||
ListTile(
|
||||
leading: CircleAvatar(
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:gwid/consts.dart';
|
||||
import 'package:gwid/models/profile.dart';
|
||||
import 'package:gwid/api/api_service.dart';
|
||||
import 'package:gwid/screens/manage_account_screen.dart';
|
||||
@@ -470,7 +471,7 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 24.0),
|
||||
child: Text(
|
||||
'v0.3.0-beta.1',
|
||||
version,
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Theme.of(
|
||||
|
||||
@@ -26,9 +26,13 @@ import 'package:just_audio/just_audio.dart';
|
||||
import 'package:gwid/services/cache_service.dart';
|
||||
import 'package:video_player/video_player.dart';
|
||||
import 'package:gwid/services/music_player_service.dart';
|
||||
import 'package:platform_info/platform_info.dart';
|
||||
|
||||
bool _currentIsDark = false;
|
||||
|
||||
bool isMobile = Platform.instance.operatingSystem.iOS ||
|
||||
Platform.instance.operatingSystem.android;
|
||||
|
||||
enum MessageReadStatus {
|
||||
sending, // Отправляется (часы)
|
||||
sent, // Отправлено (1 галочка)
|
||||
@@ -1081,12 +1085,22 @@ class ChatMessageBubble extends StatelessWidget {
|
||||
);
|
||||
|
||||
if (onReaction != null || (isMe && (onEdit != null || onDelete != null))) {
|
||||
if (isMobile) {
|
||||
messageContent = GestureDetector(
|
||||
onTapDown: (TapDownDetails details) {
|
||||
_showMessageContextMenu(context, details.globalPosition);
|
||||
},
|
||||
child: messageContent,
|
||||
);
|
||||
} else {
|
||||
messageContent = GestureDetector(
|
||||
onSecondaryTapDown: (TapDownDetails details) {
|
||||
_showMessageContextMenu(context, details.globalPosition);
|
||||
},
|
||||
child: messageContent,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return Column(
|
||||
@@ -1535,12 +1549,21 @@ class ChatMessageBubble extends StatelessWidget {
|
||||
);
|
||||
|
||||
if (onReaction != null || (isMe && (onEdit != null || onDelete != null))) {
|
||||
if (isMobile) {
|
||||
videoContent = GestureDetector(
|
||||
onTapDown: (TapDownDetails details) {
|
||||
_showMessageContextMenu(context, details.globalPosition);
|
||||
},
|
||||
child: videoContent,
|
||||
);
|
||||
} else {
|
||||
videoContent = GestureDetector(
|
||||
onSecondaryTapDown: (TapDownDetails details) {
|
||||
_showMessageContextMenu(context, details.globalPosition);
|
||||
},
|
||||
child: videoContent,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return videoContent;
|
||||
@@ -1621,12 +1644,21 @@ class ChatMessageBubble extends StatelessWidget {
|
||||
);
|
||||
|
||||
if (onReaction != null || (isMe && (onEdit != null || onDelete != null))) {
|
||||
if (isMobile) {
|
||||
photoContent = GestureDetector(
|
||||
onTapDown: (TapDownDetails details) {
|
||||
_showMessageContextMenu(context, details.globalPosition);
|
||||
},
|
||||
child: photoContent,
|
||||
);
|
||||
} else {
|
||||
photoContent = GestureDetector(
|
||||
onTapDown: (TapDownDetails details) {
|
||||
_showMessageContextMenu(context, details.globalPosition);
|
||||
},
|
||||
child: photoContent,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return photoContent;
|
||||
@@ -1749,12 +1781,21 @@ class ChatMessageBubble extends StatelessWidget {
|
||||
);
|
||||
|
||||
if (onReaction != null || (isMe && (onEdit != null || onDelete != null))) {
|
||||
if (isMobile) {
|
||||
videoContent = GestureDetector(
|
||||
onTapDown: (TapDownDetails details) {
|
||||
_showMessageContextMenu(context, details.globalPosition);
|
||||
},
|
||||
child: videoContent,
|
||||
);
|
||||
} else {
|
||||
videoContent = GestureDetector(
|
||||
onSecondaryTapDown: (TapDownDetails details) {
|
||||
_showMessageContextMenu(context, details.globalPosition);
|
||||
},
|
||||
child: videoContent,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
return videoContent;
|
||||
|
||||
Reference in New Issue
Block a user