Add singbox deeplink

This commit is contained in:
problematicconsumer
2023-08-26 23:35:17 +03:30
parent 2ecb781f60
commit b97dde60ff
3 changed files with 26 additions and 13 deletions

View File

@@ -15,7 +15,7 @@ class DeepLinkService extends _$DeepLinkService
Future<NewProfileLink?> build() async {
if (Platform.isLinux) return null;
loggy.debug("initializing");
for (final protocol in _protocols) {
for (final protocol in LinkParser.protocols) {
await protocolHandler.register(protocol);
}
protocolHandler.addListener(this);
@@ -32,8 +32,6 @@ class DeepLinkService extends _$DeepLinkService
return null;
}
static const _protocols = ['clash', 'clashmeta'];
@override
void onProtocolUrlReceived(String url) {
super.onProtocolUrlReceived(url);