diff --git a/lib/modules/more/settings/browse/browse_screen.dart b/lib/modules/more/settings/browse/browse_screen.dart index fba9a00e..f966d8b8 100644 --- a/lib/modules/more/settings/browse/browse_screen.dart +++ b/lib/modules/more/settings/browse/browse_screen.dart @@ -1,3 +1,5 @@ +import 'dart:io'; + import 'package:flutter/material.dart'; import 'package:flutter_riverpod/flutter_riverpod.dart'; import 'package:go_router/go_router.dart'; @@ -58,37 +60,38 @@ class BrowseSScreen extends ConsumerWidget { ], ), ), - ListTile( - onTap: () => _showAndroidProxyServerDialog( - context, - ref, - androidProxyServer, - ), - title: Text(l10n.android_proxy_server), - subtitle: Text( - androidProxyServer, - style: TextStyle( - fontSize: 11, - color: context.secondaryColor, + if (!Platform.isAndroid) + ListTile( + onTap: () => _showAndroidProxyServerDialog( + context, + ref, + androidProxyServer, + ), + title: Text(l10n.android_proxy_server), + subtitle: Text( + androidProxyServer, + style: TextStyle( + fontSize: 11, + color: context.secondaryColor, + ), + ), + trailing: OutlinedButton.icon( + onPressed: () async { + if (!await launchUrl( + Uri.parse(apkUrl), + mode: LaunchMode.externalApplication, + )) { + AppLogger.log( + 'Could not launch $apkUrl', + logLevel: LogLevel.error, + ); + botToast('Could not launch $apkUrl'); + } + }, + label: Text(l10n.get_apk_bridge), + icon: const Icon(Icons.download_outlined), ), ), - trailing: OutlinedButton.icon( - onPressed: () async { - if (!await launchUrl( - Uri.parse(apkUrl), - mode: LaunchMode.externalApplication, - )) { - AppLogger.log( - 'Could not launch $apkUrl', - logLevel: LogLevel.error, - ); - botToast('Could not launch $apkUrl'); - } - }, - label: Text(l10n.get_apk_bridge), - icon: const Icon(Icons.download_outlined), - ), - ), ListTile( onTap: () { context.push( diff --git a/lib/services/fetch_sources_list.dart b/lib/services/fetch_sources_list.dart index 11f83339..08fa73df 100644 --- a/lib/services/fetch_sources_list.dart +++ b/lib/services/fetch_sources_list.dart @@ -1,4 +1,5 @@ import 'dart:convert'; +import 'dart:io'; import 'package:http_interceptor/http_interceptor.dart'; import 'package:isar_community/isar.dart'; import 'package:mangayomi/eval/lib.dart'; @@ -69,8 +70,9 @@ Future fetchSourcesList({ ? ItemType.anime : ItemType.manga ..iconUrl = "$repoUrl/icon/${e['pkg']}.png" - ..notes = - "Requires Android Proxy Server (ApkBridge) for installing and using the extensions!"; + ..notes = Platform.isAndroid + ? null + : "Requires Android Proxy Server (ApkBridge) for installing and using the extensions!"; src.id = 'mihon-${source['id']}'.hashCode; yield src; }