fix: не хочу софтлок на линухе

This commit is contained in:
torvalds
2026-06-28 17:01:04 +07:00
parent 44658bec3b
commit 662ddb2fbd
2 changed files with 23 additions and 4 deletions
@@ -108,11 +108,24 @@ class _ChatInfoScreenState extends State<ChatInfoScreen> {
'Ссылки',
];
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<ChatInfoScreen> {
if (mounted) {
setState(() {
_isLoading = false;
if (_selectedTab.isEmpty) _selectedTab = _tabs.first;
if (_selectedTab.isEmpty && _tabs.isNotEmpty) _selectedTab = _tabs.first;
});
}
}
+6
View File
@@ -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;