diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 31539ee..e491d84 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -61,6 +61,12 @@ + + + @@ -80,8 +86,8 @@ - - + + diff --git a/landing-page/static/index.html b/landing-page/static/index.html index 1135be9..8941d2c 100755 --- a/landing-page/static/index.html +++ b/landing-page/static/index.html @@ -172,8 +172,10 @@

Do ios linux + diff --git a/lib/provider/metadata_provider.dart b/lib/provider/metadata_provider.dart index 4cf295c..d3a847a 100644 --- a/lib/provider/metadata_provider.dart +++ b/lib/provider/metadata_provider.dart @@ -78,7 +78,7 @@ class MetadataProvider extends ChangeNotifier with LaterFunction { RelaySet? relaySet = settingProvider.gossip == 1 && feedRelaySet != null ? feedRelaySet : myInboxRelaySet; if (relaySet != null) { loading = true; - List loaded = await ndk.metadatas.loadMetadatas(_needUpdateMetadatas, relaySet, onLoad: (metadata) { + List loaded = await ndk.metadata.loadMetadatas(_needUpdateMetadatas, relaySet, onLoad: (metadata) { _needUpdateMetadatas.remove(metadata.pubKey); notifyListeners(); }); @@ -126,12 +126,12 @@ class MetadataProvider extends ChangeNotifier with LaterFunction { if (metadata!=null) { if (StringUtil.isNotBlank(lud16) && StringUtil.isBlank(metadata.lud16)) { metadata.lud16 = lud16; - await ndk.metadatas.broadcastMetadata( + await ndk.metadata.broadcastMetadata( metadata, myInboxRelaySet!.urls, loggedUserSigner!); } } else { metadata ??= Metadata(pubKey: loggedUserSigner!.getPublicKey(), lud16: lud16); - metadata = await ndk.metadatas.broadcastMetadata(metadata, DEFAULT_BOOTSTRAP_RELAYS, loggedUserSigner!); + metadata = await ndk.metadata.broadcastMetadata(metadata, DEFAULT_BOOTSTRAP_RELAYS, loggedUserSigner!); await cacheManager.saveMetadata(metadata); notifyListeners(); } diff --git a/lib/provider/new_notifications_provider.dart b/lib/provider/new_notifications_provider.dart index ec85f7d..b43637c 100644 --- a/lib/provider/new_notifications_provider.dart +++ b/lib/provider/new_notifications_provider.dart @@ -60,7 +60,7 @@ class NewNotificationsProvider extends ChangeNotifier relaySet: myInboxRelaySet!) .stream) { // TODO fix this since it was screwing over received events to handle (metadata mixed) - handleEvent(event, await ndk.metadatas.loadMetadata(event.pubKey)); + handleEvent(event, await ndk.metadata.loadMetadata(event.pubKey)); } } diff --git a/lib/router/profile_editor/profile_editor_router.dart b/lib/router/profile_editor/profile_editor_router.dart index 71fd6ac..d677e5b 100644 --- a/lib/router/profile_editor/profile_editor_router.dart +++ b/lib/router/profile_editor/profile_editor_router.dart @@ -79,7 +79,7 @@ class _ProfileEditorRouter extends CustState { if (cached!=null && cached.refreshedTimestamp!=null && cached.refreshedTimestamp! > (DateTime.now().subtract(REFRESH_METADATA_BEFORE_EDIT_DURATION).millisecondsSinceEpoch ~/ 1000)) { metadata = cached; } else { - ndk.metadatas.loadMetadata( + ndk.metadata.loadMetadata( loggedUserSigner!.getPublicKey(), forceRefresh: true).then(( metadata) { setState(() { @@ -321,7 +321,7 @@ class _ProfileEditorRouter extends CustState { metadata!.lud16 = lud16Controller.text; metadata!.lud06 = lud06Controller.text; - await ndk.metadatas.broadcastMetadata(metadata!, myOutboxRelaySet!.urls, loggedUserSigner!); + await ndk.metadata.broadcastMetadata(metadata!, myOutboxRelaySet!.urls, loggedUserSigner!); metadataProvider.notifyListeners(); setState(() { broadcasting = false; diff --git a/lib/router/search/search_router.dart b/lib/router/search/search_router.dart index 03e5f49..b3ea345 100644 --- a/lib/router/search/search_router.dart +++ b/lib/router/search/search_router.dart @@ -467,7 +467,7 @@ class _SearchRouter extends CustState searchAbles.add(SearchActions.openPubkey); metadatasFromSearch.clear(); - ndk.metadatas.loadMetadata(Nip19.decode(text)).then((metadata) { + ndk.metadata.loadMetadata(Nip19.decode(text)).then((metadata) { setState(() { if (metadata != null) { metadatasFromSearch = [metadata]; diff --git a/macos/Flutter/GeneratedPluginRegistrant.swift b/macos/Flutter/GeneratedPluginRegistrant.swift index a2a9092..f39b579 100644 --- a/macos/Flutter/GeneratedPluginRegistrant.swift +++ b/macos/Flutter/GeneratedPluginRegistrant.swift @@ -20,7 +20,7 @@ import package_info_plus import pasteboard import path_provider_foundation import photo_manager -import protocol_handler_macos +import protocol_handler import screen_retriever import share_plus import shared_preferences_foundation @@ -45,7 +45,7 @@ func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) { PasteboardPlugin.register(with: registry.registrar(forPlugin: "PasteboardPlugin")) PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin")) PhotoManagerPlugin.register(with: registry.registrar(forPlugin: "PhotoManagerPlugin")) - ProtocolHandlerMacosPlugin.register(with: registry.registrar(forPlugin: "ProtocolHandlerMacosPlugin")) + ProtocolHandlerPlugin.register(with: registry.registrar(forPlugin: "ProtocolHandlerPlugin")) ScreenRetrieverPlugin.register(with: registry.registrar(forPlugin: "ScreenRetrieverPlugin")) SharePlusMacosPlugin.register(with: registry.registrar(forPlugin: "SharePlusMacosPlugin")) SharedPreferencesPlugin.register(with: registry.registrar(forPlugin: "SharedPreferencesPlugin")) diff --git a/pubspec.lock b/pubspec.lock index 627cd0d..dd19a9f 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -117,10 +117,10 @@ packages: dependency: "direct main" description: name: bip340 - sha256: "2a92f6ed68959f75d67c9a304c17928b9c9449587d4f75ee68f34152f7f69e87" + sha256: b7bcd70a860e605046006adaa72bc4f7453f4d31d7ba74a4ad9d5de387a0fc0b url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.3.0" bolt11_decoder: dependency: "direct main" description: @@ -1306,10 +1306,10 @@ packages: dependency: "direct main" description: name: ndk - sha256: add1328a9279beca49a3be69a879d1bd8673bccb9808f8eb2f7100e1f250f0f4 + sha256: c77f66332020e66b220d835a71b8270da2c25cee971966947169b00a8b0439ab url: "https://pub.dev" source: hosted - version: "0.1.0-dev995" + version: "0.1.1" nested: dependency: transitive description: @@ -1546,50 +1546,10 @@ packages: dependency: "direct main" description: name: protocol_handler - sha256: dc2e2dcb1e0e313c3f43827ec3fa6d98adee6e17edc0c3923ac67efee87479a9 - url: "https://pub.dev" - source: hosted - version: "0.2.0" - protocol_handler_android: - dependency: transitive - description: - name: protocol_handler_android - sha256: "82eb860ca42149e400328f54b85140329a1766d982e94705b68271f6ca73895c" - url: "https://pub.dev" - source: hosted - version: "0.2.0" - protocol_handler_ios: - dependency: transitive - description: - name: protocol_handler_ios - sha256: "0d3a56b8c1926002cb1e32b46b56874759f4dcc8183d389b670864ac041b6ec2" - url: "https://pub.dev" - source: hosted - version: "0.2.0" - protocol_handler_macos: - dependency: transitive - description: - name: protocol_handler_macos - sha256: "6eb8687a84e7da3afbc5660ce046f29d7ecf7976db45a9dadeae6c87147dd710" - url: "https://pub.dev" - source: hosted - version: "0.2.0" - protocol_handler_platform_interface: - dependency: transitive - description: - name: protocol_handler_platform_interface - sha256: "53776b10526fdc25efdf1abcf68baf57fdfdb75342f4101051db521c9e3f3e5b" + sha256: fb1882bd6cf767114f46b4708d1794fcd662e0a9b9b4512519adeaff3f931d7d url: "https://pub.dev" source: hosted - version: "0.2.0" - protocol_handler_windows: - dependency: transitive - description: - name: protocol_handler_windows - sha256: d8f3a58938386aca2c76292757392f4d059d09f11439d6d896d876ebe997f2c4 - url: "https://pub.dev" - source: hosted - version: "0.2.0" + version: "0.1.6" provider: dependency: "direct main" description: @@ -1650,10 +1610,10 @@ packages: dependency: transitive description: name: rust_lib_ndk - sha256: "6d4c296204bc57982a2927030212c706a72f924a0383b1910b84518a66a4b8ab" + sha256: f71e61e1a295fbdcac250a88b315518aca1d7a5533684b32e7c9c1b58e989ae7 url: "https://pub.dev" source: hosted - version: "0.0.4-dev002" + version: "0.1.1" rxdart: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index e14184e..94ecdb3 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -16,7 +16,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html # In Windows, build-name is used as the major, minor, and patch parts # of the product and file versions while build-number is used as the build suffix. -version: 0.15.2+3009 +version: 0.15.1+3008 versionCode: 3000 environment: @@ -43,7 +43,7 @@ dependencies: shared_preferences: ^2.1.1 bot_toast: ^4.0.4 flutter_quill: ^8.6.3 - bip340: ^0.2.0 + bip340: ^0.3.0 string_validator: ^1.0.0 http: ^1.1.0 get_time_ago: ^1.2.2 @@ -110,7 +110,7 @@ dependencies: scrollable_positioned_list: ^0.3.8 #js: ^0.6.7 flutter_svg: ^2.0.7 - protocol_handler: ^0.2.0 + protocol_handler: ^0.1.5 flutter_spinkit: ^5.2.0 isar: ^4.0.0-dev.14 isar_flutter_libs: ^4.0.0-dev.14 @@ -125,7 +125,7 @@ dependencies: lottie: ^3.1.2 bolt11_decoder: ^1.0.2 - ndk: ^0.1.0 + ndk: ^0.1.1 # ndk: # git: # url: https://github.com/relaystr/dart_ndk.git diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc index 7d8e09f..00ce724 100644 --- a/windows/flutter/generated_plugin_registrant.cc +++ b/windows/flutter/generated_plugin_registrant.cc @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include #include @@ -43,8 +43,8 @@ void RegisterPlugins(flutter::PluginRegistry* registry) { registry->GetRegistrarForPlugin("PasteboardPlugin")); PermissionHandlerWindowsPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin")); - ProtocolHandlerWindowsPluginCApiRegisterWithRegistrar( - registry->GetRegistrarForPlugin("ProtocolHandlerWindowsPluginCApi")); + ProtocolHandlerPluginRegisterWithRegistrar( + registry->GetRegistrarForPlugin("ProtocolHandlerPlugin")); ScreenRetrieverPluginRegisterWithRegistrar( registry->GetRegistrarForPlugin("ScreenRetrieverPlugin")); SharePlusWindowsPluginCApiRegisterWithRegistrar( diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake index 163c5c5..5bd4119 100644 --- a/windows/flutter/generated_plugins.cmake +++ b/windows/flutter/generated_plugins.cmake @@ -13,7 +13,7 @@ list(APPEND FLUTTER_PLUGIN_LIST local_auth_windows pasteboard permission_handler_windows - protocol_handler_windows + protocol_handler screen_retriever share_plus url_launcher_windows