From e63c6fc2d2f4a091d79a09a285a8a1574e9f5140 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Sat, 15 Jul 2023 08:29:54 +0200 Subject: [PATCH] neon_news,neon_notes: Use wakelock_plus --- packages/app/pubspec.lock | 41 ++++--------------- packages/app/pubspec.yaml | 7 ---- packages/app/pubspec_overrides.yaml | 7 +--- packages/neon/neon/pubspec.yaml | 7 ---- packages/neon/neon/pubspec_overrides.yaml | 7 +--- packages/neon/neon_news/lib/neon_news.dart | 2 +- .../neon/neon_news/lib/pages/article.dart | 4 +- packages/neon/neon_news/pubspec.yaml | 9 +--- .../neon/neon_news/pubspec_overrides.yaml | 7 +--- packages/neon/neon_notes/lib/neon_notes.dart | 2 +- packages/neon/neon_notes/lib/pages/note.dart | 4 +- packages/neon/neon_notes/pubspec.yaml | 9 +--- .../neon/neon_notes/pubspec_overrides.yaml | 7 +--- 13 files changed, 20 insertions(+), 93 deletions(-) diff --git a/packages/app/pubspec.lock b/packages/app/pubspec.lock index 09d8b682..10a17114 100644 --- a/packages/app/pubspec.lock +++ b/packages/app/pubspec.lock @@ -1425,47 +1425,22 @@ packages: url: "https://pub.dev" source: hosted version: "11.3.0" - wakelock: + wakelock_plus: dependency: transitive description: - name: wakelock - sha256: "769ecf42eb2d07128407b50cb93d7c10bd2ee48f0276ef0119db1d25cc2f87db" + name: wakelock_plus + sha256: aac3f3258f01781ec9212df94eecef1eb9ba9350e106728def405baa096ba413 url: "https://pub.dev" source: hosted - version: "0.6.2" - wakelock_macos: - dependency: transitive - description: - name: wakelock_macos - sha256: "047c6be2f88cb6b76d02553bca5a3a3b95323b15d30867eca53a19a0a319d4cd" - url: "https://pub.dev" - source: hosted - version: "0.4.0" - wakelock_platform_interface: - dependency: transitive - description: - name: wakelock_platform_interface - sha256: "1f4aeb81fb592b863da83d2d0f7b8196067451e4df91046c26b54a403f9de621" - url: "https://pub.dev" - source: hosted - version: "0.3.0" - wakelock_web: + version: "1.1.1" + wakelock_plus_platform_interface: dependency: transitive description: - name: wakelock_web - sha256: "1b256b811ee3f0834888efddfe03da8d18d0819317f20f6193e2922b41a501b5" + name: wakelock_plus_platform_interface + sha256: "40fabed5da06caff0796dc638e1f07ee395fb18801fbff3255a2372db2d80385" url: "https://pub.dev" source: hosted - version: "0.4.0" - wakelock_windows: - dependency: "direct overridden" - description: - path: wakelock_windows - ref: "269e1dba6bca6975a0bc44da6a42e56ca7428da9" - resolved-ref: "269e1dba6bca6975a0bc44da6a42e56ca7428da9" - url: "https://github.com/fikretonuresen/wakelock" - source: git - version: "0.2.2" + version: "1.1.0" webdriver: dependency: transitive description: diff --git a/packages/app/pubspec.yaml b/packages/app/pubspec.yaml index 6e138a2a..4e96fdf4 100644 --- a/packages/app/pubspec.yaml +++ b/packages/app/pubspec.yaml @@ -44,13 +44,6 @@ dev_dependencies: url: https://github.com/stack11/dart_nit_picking ref: 0b2ee0d -dependency_overrides: - wakelock_windows: # TODO: https://github.com/creativecreatorormaybenot/wakelock/pull/195 - git: - url: https://github.com/fikretonuresen/wakelock - path: wakelock_windows - ref: 269e1dba6bca6975a0bc44da6a42e56ca7428da9 - flutter: uses-material-design: true assets: diff --git a/packages/app/pubspec_overrides.yaml b/packages/app/pubspec_overrides.yaml index 769385c2..42527add 100644 --- a/packages/app/pubspec_overrides.yaml +++ b/packages/app/pubspec_overrides.yaml @@ -1,4 +1,4 @@ -# melos_managed_dependency_overrides: dynamite_runtime,file_icons,neon,neon_files,neon_news,neon_notes,neon_notifications,nextcloud,sort_box,wakelock_windows +# melos_managed_dependency_overrides: dynamite_runtime,file_icons,neon,neon_files,neon_news,neon_notes,neon_notifications,nextcloud,sort_box dependency_overrides: dynamite_runtime: path: ../dynamite/dynamite_runtime @@ -18,8 +18,3 @@ dependency_overrides: path: ../nextcloud sort_box: path: ../sort_box - wakelock_windows: - git: - url: https://github.com/fikretonuresen/wakelock - ref: 269e1dba6bca6975a0bc44da6a42e56ca7428da9 - path: wakelock_windows diff --git a/packages/neon/neon/pubspec.yaml b/packages/neon/neon/pubspec.yaml index 93ab4173..0479da47 100644 --- a/packages/neon/neon/pubspec.yaml +++ b/packages/neon/neon/pubspec.yaml @@ -66,13 +66,6 @@ dev_dependencies: ref: 0b2ee0d test: ^1.24.3 -dependency_overrides: - wakelock_windows: # TODO: https://github.com/creativecreatorormaybenot/wakelock/pull/195 - git: - url: https://github.com/fikretonuresen/wakelock - path: wakelock_windows - ref: 269e1dba6bca6975a0bc44da6a42e56ca7428da9 - flutter: uses-material-design: true assets: diff --git a/packages/neon/neon/pubspec_overrides.yaml b/packages/neon/neon/pubspec_overrides.yaml index fa3b7c95..2e927e31 100644 --- a/packages/neon/neon/pubspec_overrides.yaml +++ b/packages/neon/neon/pubspec_overrides.yaml @@ -1,4 +1,4 @@ -# melos_managed_dependency_overrides: dynamite_runtime,nextcloud,sort_box,wakelock_windows +# melos_managed_dependency_overrides: dynamite_runtime,nextcloud,sort_box dependency_overrides: dynamite_runtime: path: ../../dynamite/dynamite_runtime @@ -6,8 +6,3 @@ dependency_overrides: path: ../../nextcloud sort_box: path: ../../sort_box - wakelock_windows: - git: - url: https://github.com/fikretonuresen/wakelock - ref: 269e1dba6bca6975a0bc44da6a42e56ca7428da9 - path: wakelock_windows diff --git a/packages/neon/neon_news/lib/neon_news.dart b/packages/neon/neon_news/lib/neon_news.dart index 3a534290..9b9863ea 100644 --- a/packages/neon/neon_news/lib/neon_news.dart +++ b/packages/neon/neon_news/lib/neon_news.dart @@ -23,7 +23,7 @@ import 'package:provider/provider.dart'; import 'package:rxdart/rxdart.dart'; import 'package:share_plus/share_plus.dart'; import 'package:url_launcher/url_launcher_string.dart'; -import 'package:wakelock/wakelock.dart'; +import 'package:wakelock_plus/wakelock_plus.dart'; import 'package:webview_flutter/webview_flutter.dart'; part 'blocs/article.dart'; diff --git a/packages/neon/neon_news/lib/pages/article.dart b/packages/neon/neon_news/lib/pages/article.dart index eaa2d232..1aaf4766 100644 --- a/packages/neon/neon_news/lib/pages/article.dart +++ b/packages/neon/neon_news/lib/pages/article.dart @@ -35,7 +35,7 @@ class _NewsArticlePageState extends State { WidgetsBinding.instance.addPostFrameCallback((final _) async { if (Provider.of(context, listen: false).canUseWakelock) { - await Wakelock.enable(); + await WakelockPlus.enable(); } }); @@ -103,7 +103,7 @@ class _NewsArticlePageState extends State { } if (mounted && Provider.of(context, listen: false).canUseWakelock) { - await Wakelock.disable(); + await WakelockPlus.disable(); } return false; }, diff --git a/packages/neon/neon_news/pubspec.yaml b/packages/neon/neon_news/pubspec.yaml index c4c3a2c0..d0c003ac 100644 --- a/packages/neon/neon_news/pubspec.yaml +++ b/packages/neon/neon_news/pubspec.yaml @@ -25,7 +25,7 @@ dependencies: rxdart: ^0.27.7 share_plus: ^7.0.0 url_launcher: ^6.1.11 - wakelock: ^0.6.2 + wakelock_plus: ^1.1.1 webview_flutter: ^4.2.0 dev_dependencies: @@ -36,13 +36,6 @@ dev_dependencies: url: https://github.com/stack11/dart_nit_picking ref: 0b2ee0d -dependency_overrides: - wakelock_windows: # TODO: https://github.com/creativecreatorormaybenot/wakelock/pull/195 - git: - url: https://github.com/fikretonuresen/wakelock - path: wakelock_windows - ref: 269e1dba6bca6975a0bc44da6a42e56ca7428da9 - flutter: uses-material-design: true assets: diff --git a/packages/neon/neon_news/pubspec_overrides.yaml b/packages/neon/neon_news/pubspec_overrides.yaml index 807ec964..bc921fe9 100644 --- a/packages/neon/neon_news/pubspec_overrides.yaml +++ b/packages/neon/neon_news/pubspec_overrides.yaml @@ -1,4 +1,4 @@ -# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,sort_box,wakelock_windows +# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,sort_box dependency_overrides: dynamite_runtime: path: ../../dynamite/dynamite_runtime @@ -8,8 +8,3 @@ dependency_overrides: path: ../../nextcloud sort_box: path: ../../sort_box - wakelock_windows: - git: - url: https://github.com/fikretonuresen/wakelock - ref: 269e1dba6bca6975a0bc44da6a42e56ca7428da9 - path: wakelock_windows diff --git a/packages/neon/neon_notes/lib/neon_notes.dart b/packages/neon/neon_notes/lib/neon_notes.dart index a5c29136..7547558d 100644 --- a/packages/neon/neon_notes/lib/neon_notes.dart +++ b/packages/neon/neon_notes/lib/neon_notes.dart @@ -23,7 +23,7 @@ import 'package:provider/provider.dart'; import 'package:queue/queue.dart'; import 'package:rxdart/rxdart.dart'; import 'package:url_launcher/url_launcher_string.dart'; -import 'package:wakelock/wakelock.dart'; +import 'package:wakelock_plus/wakelock_plus.dart'; part 'blocs/note.dart'; part 'blocs/notes.dart'; diff --git a/packages/neon/neon_notes/lib/pages/note.dart b/packages/neon/neon_notes/lib/pages/note.dart index 16ed07ce..06e40bdc 100644 --- a/packages/neon/neon_notes/lib/pages/note.dart +++ b/packages/neon/neon_notes/lib/pages/note.dart @@ -43,7 +43,7 @@ class _NotesNotePageState extends State { WidgetsBinding.instance.addPostFrameCallback((final _) async { if (Provider.of(context, listen: false).canUseWakelock) { - await Wakelock.enable(); + await WakelockPlus.enable(); } if (widget.bloc.options.defaultNoteViewTypeOption.value == DefaultNoteViewType.edit || widget.bloc.initialContent.isEmpty) { @@ -66,7 +66,7 @@ class _NotesNotePageState extends State { Widget build(final BuildContext context) => BackButtonListener( onBackButtonPressed: () async { if (Provider.of(context, listen: false).canUseWakelock) { - await Wakelock.disable(); + await WakelockPlus.disable(); } return false; }, diff --git a/packages/neon/neon_notes/pubspec.yaml b/packages/neon/neon_notes/pubspec.yaml index 6319ea2b..e151e5a6 100644 --- a/packages/neon/neon_notes/pubspec.yaml +++ b/packages/neon/neon_notes/pubspec.yaml @@ -26,7 +26,7 @@ dependencies: queue: ^3.1.0+2 rxdart: ^0.27.7 url_launcher: ^6.1.11 - wakelock: ^0.6.2 + wakelock_plus: ^1.1.1 dev_dependencies: build_runner: ^2.4.4 @@ -36,13 +36,6 @@ dev_dependencies: url: https://github.com/stack11/dart_nit_picking ref: 0b2ee0d -dependency_overrides: - wakelock_windows: # TODO: https://github.com/creativecreatorormaybenot/wakelock/pull/195 - git: - url: https://github.com/fikretonuresen/wakelock - path: wakelock_windows - ref: 269e1dba6bca6975a0bc44da6a42e56ca7428da9 - flutter: uses-material-design: true assets: diff --git a/packages/neon/neon_notes/pubspec_overrides.yaml b/packages/neon/neon_notes/pubspec_overrides.yaml index 807ec964..bc921fe9 100644 --- a/packages/neon/neon_notes/pubspec_overrides.yaml +++ b/packages/neon/neon_notes/pubspec_overrides.yaml @@ -1,4 +1,4 @@ -# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,sort_box,wakelock_windows +# melos_managed_dependency_overrides: dynamite_runtime,neon,nextcloud,sort_box dependency_overrides: dynamite_runtime: path: ../../dynamite/dynamite_runtime @@ -8,8 +8,3 @@ dependency_overrides: path: ../../nextcloud sort_box: path: ../../sort_box - wakelock_windows: - git: - url: https://github.com/fikretonuresen/wakelock - ref: 269e1dba6bca6975a0bc44da6a42e56ca7428da9 - path: wakelock_windows