diff --git a/lib/frontend/screens/chats/chat_info_screen.dart b/lib/frontend/screens/chats/chat_info_screen.dart index 24d67e6..d3e2b30 100644 --- a/lib/frontend/screens/chats/chat_info_screen.dart +++ b/lib/frontend/screens/chats/chat_info_screen.dart @@ -108,11 +108,24 @@ class _ChatInfoScreenState extends State { 'Ссылки', ]; case 'CHAT': - return ['Участники', 'Info', 'Медиа', 'Файлы', 'Голосовые', 'Ссылки']; + return [ + 'Участники', + if (showInfo) 'Info', + 'Медиа', + 'Файлы', + 'Голосовые', + 'Ссылки', + ]; case 'CHANNEL': - return ['Info', 'Медиа', 'Файлы', 'Голосовые', 'Ссылки']; + return [ + if (showInfo) 'Info', + 'Медиа', + 'Файлы', + 'Голосовые', + 'Ссылки', + ]; default: - return ['Info']; + return [if (showInfo) 'Info']; } } @@ -199,7 +212,7 @@ class _ChatInfoScreenState extends State { if (mounted) { setState(() { _isLoading = false; - if (_selectedTab.isEmpty) _selectedTab = _tabs.first; + if (_selectedTab.isEmpty && _tabs.isNotEmpty) _selectedTab = _tabs.first; }); } } diff --git a/lib/frontend/widgets/message_bubble.dart b/lib/frontend/widgets/message_bubble.dart index 0cc2d99..015314f 100644 --- a/lib/frontend/widgets/message_bubble.dart +++ b/lib/frontend/widgets/message_bubble.dart @@ -22,6 +22,7 @@ import '../../core/utils/file_download.dart'; import '../../core/utils/media_cache.dart'; import '../../core/utils/download_progress.dart'; import '../../core/utils/link_opener.dart'; +import '../../core/utils/webview_support.dart'; import '../../core/config/app_link_preview.dart'; import 'custom_notification.dart'; import 'link_text.dart'; @@ -706,6 +707,11 @@ class MessageBubble extends StatelessWidget { BuildContext context, InlineKeyboardButton button, ) async { + if (!webViewSupported) { + showCustomNotification(context, 'На вашей платформе это недоступно'); + return; + } + final deeplink = button.webApp != null ? Uri.tryParse(button.webApp!) : null;