Skip to content

Commit

Permalink
deps: bump refena to 2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Tienisto committed May 24, 2024
1 parent 9f72cf2 commit a9f5e16
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
6 changes: 3 additions & 3 deletions app/lib/init.dart
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Future<void> postInit(BuildContext context, Ref ref, bool appStart, void Functio
if (initialSharedPayload != null) {
hasInitialShare = true;
// ignore: unawaited_futures
ref.dispatchAsync(_HandleShareIntentAction(
ref.global.dispatchAsync(_HandleShareIntentAction(
payload: initialSharedPayload,
goToPage: goToPage,
));
Expand All @@ -163,7 +163,7 @@ Future<void> postInit(BuildContext context, Ref ref, bool appStart, void Functio

_sharedMediaSubscription?.cancel(); // ignore: unawaited_futures
_sharedMediaSubscription = shareHandler.sharedMediaStream.listen((SharedMedia payload) {
ref.dispatchAsync(_HandleShareIntentAction(
ref.global.dispatchAsync(_HandleShareIntentAction(
payload: payload,
goToPage: goToPage,
));
Expand All @@ -173,7 +173,7 @@ Future<void> postInit(BuildContext context, Ref ref, bool appStart, void Functio
if (appStart && !hasInitialShare && (checkPlatformWithGallery() || checkPlatformCanReceiveShareIntent())) {
// Clear cache on every app start.
// If we received a share intent, then don't clear it, otherwise the shared file will be lost.
ref.dispatchAsync(ClearCacheAction()); // ignore: unawaited_futures
ref.global.dispatchAsync(ClearCacheAction()); // ignore: unawaited_futures
}

// [FOSS_REMOVE_START]
Expand Down
2 changes: 1 addition & 1 deletion app/lib/pages/donation/donation_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class DonationPage extends StatelessWidget {
return ViewModelBuilder(
provider: donationPageVmProvider,
// [FOSS_REMOVE_START]
init: (context, ref) => ref.redux(purchaseProvider).dispatchAsync(FetchPricesAndPurchasesAction()), // ignore: discarded_futures
init: (context) => context.redux(purchaseProvider).dispatchAsync(FetchPricesAndPurchasesAction()), // ignore: discarded_futures
// [FOSS_REMOVE_END]
builder: (context, vm) {
return Scaffold(
Expand Down
10 changes: 5 additions & 5 deletions app/lib/pages/tabs/send_tab.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class SendTab extends StatelessWidget {
Widget build(BuildContext context) {
return ViewModelBuilder(
provider: sendTabVmProvider,
init: (context, ref) => ref.dispatchAsync(SendTabInitAction(context)), // ignore: discarded_futures
init: (context) => context.global.dispatchAsync(SendTabInitAction(context)), // ignore: discarded_futures
builder: (context, vm) {
final ref = context.ref;
return ResponsiveListView(
Expand All @@ -67,7 +67,7 @@ class SendTab extends StatelessWidget {
icon: option.icon,
label: option.label,
filled: false,
onTap: () async => ref.dispatchAsync(PickFileAction(
onTap: () async => ref.global.dispatchAsync(PickFileAction(
option: option,
context: context,
)),
Expand Down Expand Up @@ -140,7 +140,7 @@ class SendTab extends StatelessWidget {
onPressed: () async {
if (_options.length == 1) {
// open directly
await ref.dispatchAsync(PickFileAction(
await ref.global.dispatchAsync(PickFileAction(
option: _options.first,
context: context,
));
Expand Down Expand Up @@ -323,7 +323,7 @@ class _ScanButton extends StatelessWidget {
child: CustomIconButton(
onPressed: () async {
context.redux(nearbyDevicesProvider).dispatch(ClearFoundDevicesAction());
await context.ref.dispatchAsync(StartSmartScan(forceLegacy: true));
await context.global.dispatchAsync(StartSmartScan(forceLegacy: true));
},
child: Icon(Icons.sync, color: iconColor),
),
Expand All @@ -334,7 +334,7 @@ class _ScanButton extends StatelessWidget {
tooltip: t.sendTab.scan,
onSelected: (ip) async {
context.redux(nearbyDevicesProvider).dispatch(ClearFoundDevicesAction());
await context.ref.dispatchAsync(StartLegacySubnetScan(subnets: [ip]));
await context.global.dispatchAsync(StartLegacySubnetScan(subnets: [ip]));
},
itemBuilder: (_) {
return [
Expand Down
2 changes: 1 addition & 1 deletion app/lib/widget/dialogs/add_file_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ class AddFileDialog extends StatelessWidget {
filled: true,
onTap: () async {
context.popUntilRoot();
await context.ref.dispatchAsync(PickFileAction(option: option, context: context));
await context.global.dispatchAsync(PickFileAction(option: option, context: context));
},
);
}),
Expand Down
2 changes: 1 addition & 1 deletion app/lib/widget/watcher/shortcut_watcher.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class ShortcutWatcher extends StatelessWidget {
_ExitAppIntent: CallbackAction(onInvoke: (_) => exit(0)),
_PopPageIntent: CallbackAction(onInvoke: (_) async => Navigator.of(Routerino.context).maybePop()),
_PasteIntent: CallbackAction(onInvoke: (_) async {
await context.ref.dispatchAsync(PickFileAction(option: FilePickerOption.clipboard, context: context));
await context.global.dispatchAsync(PickFileAction(option: FilePickerOption.clipboard, context: context));
return null;
}),
_CloseWindowIntent: CallbackAction<_CloseWindowIntent>(
Expand Down
16 changes: 8 additions & 8 deletions app/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1161,34 +1161,34 @@ packages:
dependency: transitive
description:
name: refena
sha256: a29603854d785e5259c6fb99268847e918f54463a861accc36cc913daea95cb8
sha256: "4feb15e5eaac261d67973c1167628fc89370adf3d759e1ec958587e73fca8d43"
url: "https://pub.dev"
source: hosted
version: "1.6.1"
version: "2.0.0"
refena_flutter:
dependency: "direct main"
description:
name: refena_flutter
sha256: "2bee85271c8d8ced0238d98c1c056dbabfd4af207f9cc248d10af5a37820ae3e"
sha256: "04a2c9b349ab1317173569f6535462bb113ca7a9cdb88a9d617a9acade3f0f52"
url: "https://pub.dev"
source: hosted
version: "1.6.0"
version: "2.0.0"
refena_inspector:
dependency: "direct dev"
description:
name: refena_inspector
sha256: "495822cc8142b3a5826b5f17061b8ea60aa4b0fd7758fdec9746b85cbd61895d"
sha256: c682581e2c2e8f641f5366cd079c0db1cab33a58ec160464d03d02019e92acd2
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "2.0.0"
refena_inspector_client:
dependency: "direct main"
description:
name: refena_inspector_client
sha256: f01636eb2c9609e9a5df5591132df5d3008a4a397b70166bc18c464af09880a6
sha256: f211414cd0c45a18fa482b8fbc0d8ee3b0383cda2979f127320134c4ffa8cafb
url: "https://pub.dev"
source: hosted
version: "1.2.0"
version: "2.0.0"
routerino:
dependency: "direct main"
description:
Expand Down
6 changes: 3 additions & 3 deletions app/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ dependencies:
path_provider: 2.1.2
permission_handler: 11.0.1
pretty_qr_code: 3.2.1
refena_flutter: 1.6.0
refena_inspector_client: 1.2.0
refena_flutter: 2.0.0
refena_inspector_client: 2.0.0
routerino: 0.8.0
saf_stream: 0.4.0 # Saving files to SD card for Android <11
screen_retriever: 0.1.9
Expand Down Expand Up @@ -78,7 +78,7 @@ dev_dependencies:
flutter_lints: 3.0.1
mockito: 5.4.4
msix: 3.16.7
refena_inspector: 1.2.0
refena_inspector: 2.0.0
slang_build_runner: 3.31.0
slang_gpt: 0.10.0
test: ^1.24.3
Expand Down
2 changes: 1 addition & 1 deletion common/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ dependencies:
logging: ^1.2.0
meta: ^1.9.1
mime: ^1.0.4
refena: ^1.6.1
refena: ^2.0.0

dev_dependencies:
build_runner: ^2.4.7
Expand Down

0 comments on commit a9f5e16

Please sign in to comment.