Skip to content

Commit 74f27f1

Browse files
authored
feat: Add membership to MixinSchemeHost and update URI handling (#1791)
- Added 'membership' to the MixinSchemeHost enum. - Updated URI handling to include membership in the dialog for unknown mixin URLs. - Added isMembership extension to Uri for better type checking. This enhances the URI utility by supporting the new membership type.
1 parent 6a7b418 commit 74f27f1

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

lib/constants/constants.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ enum MixinSchemeHost {
5151
multisigs,
5252
swap,
5353
markets,
54+
membership,
5455
}
5556

5657
const int hour1 = 1000 * 60 * 60;

lib/utils/uri_utils.dart

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,17 +119,11 @@ Future<bool> openUri(
119119
);
120120
}
121121

122-
if (uri.isPay) {
123-
await showUnknownMixinUrlDialog(context, uri);
124-
return false;
125-
}
126-
127-
if (uri.isMultisigs) {
128-
await showUnknownMixinUrlDialog(context, uri);
129-
return false;
130-
}
131-
132-
if (uri.isSwap || uri.isMarkets) {
122+
if (uri.isPay ||
123+
uri.isMultisigs ||
124+
uri.isSwap ||
125+
uri.isMarkets ||
126+
uri.isMembership) {
133127
await showUnknownMixinUrlDialog(context, uri);
134128
return false;
135129
}
@@ -379,6 +373,8 @@ extension _MixinUriExtension on Uri {
379373
_isTypeHost(MixinSchemeHost.markets) ||
380374
_isTypeScheme(MixinSchemeHost.markets);
381375

376+
bool get isMembership => _isTypeHost(MixinSchemeHost.membership);
377+
382378
String? get startTextOfConversation {
383379
if (!isMixin) return null;
384380
return queryParameters['start'];

linux/flutter/generated_plugins.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
2121

2222
list(APPEND FLUTTER_FFI_PLUGIN_LIST
2323
breakpad_client
24+
jni
2425
mixin_logger
2526
ogg_opus_player
2627
rhttp

macos/Podfile.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ PODS:
4545
- FlutterMacOS
4646
- screen_retriever_macos (0.0.1):
4747
- FlutterMacOS
48-
- Sentry/HybridSDK (8.46.0)
49-
- sentry_flutter (8.14.2):
48+
- Sentry/HybridSDK (8.51.0)
49+
- sentry_flutter (9.0.0):
5050
- Flutter
5151
- FlutterMacOS
52-
- Sentry/HybridSDK (= 8.46.0)
52+
- Sentry/HybridSDK (= 8.51.0)
5353
- sqlite3 (3.50.1):
5454
- sqlite3/common (= 3.50.1)
5555
- sqlite3/common (3.50.1)
@@ -217,8 +217,8 @@ SPEC CHECKSUMS:
217217
protocol_handler_macos: f9cd7b13bcaf6b0425f7410cbe52376cb843a936
218218
rhttp: 08d791d6373089de796318f4cfb172cbcf34e78b
219219
screen_retriever_macos: 452e51764a9e1cdb74b3c541238795849f21557f
220-
Sentry: da60d980b197a46db0b35ea12cb8f39af48d8854
221-
sentry_flutter: 27892878729f42701297c628eb90e7c6529f3684
220+
Sentry: 861d70b4ff7c92bf6c21c70a8daab10ac7e7243c
221+
sentry_flutter: ce38c4d9f9a6b9a2c23299928142b85419b3d203
222222
sqlite3: 1d85290c3321153511f6e900ede7a1608718bbd5
223223
sqlite3_flutter_libs: e7fc8c9ea2200ff3271f08f127842131746b70e2
224224
super_native_extensions: c2795d6d9aedf4a79fae25cb6160b71b50549189

windows/flutter/generated_plugins.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
2525
list(APPEND FLUTTER_FFI_PLUGIN_LIST
2626
breakpad_client
2727
flutter_local_notifications_windows
28+
jni
2829
mixin_logger
2930
ogg_opus_player
3031
rhttp

0 commit comments

Comments
 (0)