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