mirror of
https://github.com/sudoxnym/fdroiddata.git
synced 2026-05-19 12:19:10 +00:00
Fix mighieramp 0.9.9 build
This commit is contained in:
parent
433a4a0d59
commit
40195de0b1
2 changed files with 202 additions and 4 deletions
|
|
@ -71,14 +71,12 @@ Builds:
|
|||
|
||||
- versionName: 0.9.9
|
||||
versionCode: 28
|
||||
disable: fails to build
|
||||
commit: efe9852eb69d84f3d02a53e2a1060a109ed8bc73
|
||||
patch:
|
||||
- remove_youtube_sentry_support_24.diff
|
||||
- fix_import_for_case_sensitive_filesystems.diff
|
||||
- remove_youtube_sentry_support_28.diff
|
||||
output: build/app/outputs/flutter-apk/app-release.apk
|
||||
srclibs:
|
||||
- flutter@3.3.8
|
||||
- flutter@3.7.7
|
||||
rm:
|
||||
- ios
|
||||
prebuild:
|
||||
|
|
|
|||
|
|
@ -0,0 +1,200 @@
|
|||
diff --git a/lib/audio/tracksPage.dart b/lib/audio/tracksPage.dart
|
||||
index 111d8c0..9ec2070 100644
|
||||
--- a/lib/audio/tracksPage.dart
|
||||
+++ b/lib/audio/tracksPage.dart
|
||||
@@ -14,7 +14,6 @@ import '../platform/platformUtils.dart';
|
||||
import '../platform/simpleSharedPrefs.dart';
|
||||
import 'audioEditor.dart';
|
||||
import 'models/jamTrack.dart';
|
||||
-import 'online_sources/YoutubeSource.dart';
|
||||
import 'online_sources/onlineTrack.dart';
|
||||
import 'trackdata/trackData.dart';
|
||||
import 'widgets/online_source/online_source.dart';
|
||||
@@ -357,26 +356,6 @@ class _TracksPageState extends State<TracksPage>
|
||||
});
|
||||
}
|
||||
|
||||
- void addFromYoutubeSource(BuildContext context) {
|
||||
- stopPlayer();
|
||||
- Navigator.of(context)
|
||||
- .push(MaterialPageRoute(
|
||||
- builder: (context) => OnlineSearchScreen(source: YoutubeSource())))
|
||||
- .then((value) {
|
||||
- if (value is List<OnlineTrack>) {
|
||||
- for (int i = 0; i < value.length; i++) {
|
||||
- var name = "${value[i].artist} - ${value[i].title}";
|
||||
- TrackData().addTrack(value[i].url, name, false);
|
||||
- }
|
||||
- TrackData().saveTracks();
|
||||
- //clear filter and scroll to bottom
|
||||
- searchCtrl.text = "";
|
||||
- setState(() {});
|
||||
- _scollToNewSongs();
|
||||
- }
|
||||
- });
|
||||
- }
|
||||
-
|
||||
void _scollToNewSongs() async {
|
||||
await Future.delayed(const Duration(milliseconds: 300));
|
||||
scrollController.animateTo(scrollController.position.maxScrollExtent,
|
||||
@@ -482,17 +461,6 @@ class _TracksPageState extends State<TracksPage>
|
||||
List<Bubble> _bubbles(BuildContext context) {
|
||||
return [
|
||||
// Floating action menu item
|
||||
- if (_showHiddenSources)
|
||||
- Bubble(
|
||||
- title: "Youtube",
|
||||
- iconColor: Colors.white,
|
||||
- bubbleColor: Colors.red,
|
||||
- icon: Icons.ondemand_video_outlined,
|
||||
- titleStyle: const TextStyle(fontSize: 16, color: Colors.white),
|
||||
- onPress: () {
|
||||
- _animationController.reverse();
|
||||
- addFromYoutubeSource(context);
|
||||
- }),
|
||||
if (_showHiddenSources)
|
||||
Bubble(
|
||||
title: "Online Source",
|
||||
diff --git a/lib/bluetooth/NuxDeviceControl.dart b/lib/bluetooth/NuxDeviceControl.dart
|
||||
index eb61860..5674efb 100644
|
||||
--- a/lib/bluetooth/NuxDeviceControl.dart
|
||||
+++ b/lib/bluetooth/NuxDeviceControl.dart
|
||||
@@ -7,7 +7,6 @@ import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:mighty_plug_manager/bluetooth/devices/NuxMighty8BT.dart';
|
||||
import 'package:mighty_plug_manager/platform/simpleSharedPrefs.dart';
|
||||
-import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
import 'package:undo/undo.dart';
|
||||
|
||||
import 'bleMidiHandler.dart';
|
||||
@@ -529,12 +528,6 @@ class NuxDeviceControl extends ChangeNotifier {
|
||||
|
||||
diagData.device = "${_device.productName} ${_device.productVersion}";
|
||||
if (connected != null) diagData.connected = connected;
|
||||
-
|
||||
- Sentry.configureScope((scope) {
|
||||
- scope.setTag(
|
||||
- "nuxDevice", "${_device.productName} ${_device.productVersion}");
|
||||
- scope.setContexts('NUX', diagData.toMap(includeJsonPreset));
|
||||
- });
|
||||
}
|
||||
|
||||
NuxDevice get device => _device;
|
||||
diff --git a/lib/main.dart b/lib/main.dart
|
||||
index b7d09b4..8059832 100644
|
||||
--- a/lib/main.dart
|
||||
+++ b/lib/main.dart
|
||||
@@ -9,7 +9,6 @@ import 'package:flutter/material.dart';
|
||||
import 'package:mighty_plug_manager/UI/pages/DebugConsolePage.dart';
|
||||
import 'package:mighty_plug_manager/bluetooth/devices/presets/presetsStorage.dart';
|
||||
import 'package:mighty_plug_manager/platform/simpleSharedPrefs.dart';
|
||||
-import 'package:sentry_flutter/sentry_flutter.dart';
|
||||
|
||||
//pages
|
||||
import 'UI/mainTabs.dart';
|
||||
@@ -18,7 +17,6 @@ import 'audio/trackdata/trackData.dart';
|
||||
import 'bluetooth/NuxDeviceControl.dart';
|
||||
|
||||
//recreate this file with your own api keys
|
||||
-import 'configKeys.dart';
|
||||
import 'modules/cloud/supabase.dart';
|
||||
|
||||
//able to create snackbars/messages everywhere
|
||||
@@ -30,56 +28,9 @@ void main() {
|
||||
WidgetsFlutterBinding.ensureInitialized();
|
||||
SharedPrefs prefs = SharedPrefs();
|
||||
|
||||
- //capture flutter errors
|
||||
- if (!kDebugMode) {
|
||||
- FlutterError.onError = (FlutterErrorDetails details) {
|
||||
- DebugConsole.print("Flutter error: ${details.toString()}");
|
||||
-
|
||||
- //update diagnostics with json preset
|
||||
- NuxDeviceControl.instance()
|
||||
- .updateDiagnosticsData(includeJsonPreset: true);
|
||||
-
|
||||
- // Send report
|
||||
- Sentry.captureException(
|
||||
- details,
|
||||
- stackTrace: details.stack,
|
||||
- );
|
||||
- };
|
||||
- }
|
||||
-
|
||||
- if (!kDebugMode) {
|
||||
- runZonedGuarded(() {
|
||||
- prefs.waitLoading().then((value) async {
|
||||
- if (!kDebugMode) {
|
||||
- await SentryFlutter.init((options) {
|
||||
- options.dsn = sentryDsn;
|
||||
- options.sampleRate = 0.33;
|
||||
- });
|
||||
- }
|
||||
- mainRunApp();
|
||||
- });
|
||||
- }, (Object error, StackTrace stackTrace) async {
|
||||
- // Whenever an error occurs, call the `_reportError` function. This sends
|
||||
- // Dart errors to the dev console or Sentry depending on the environment.
|
||||
- //_reportError(error, stackTrace);
|
||||
-
|
||||
- DebugConsole.print("Dart error: ${error.toString()}");
|
||||
- DebugConsole.print(stackTrace);
|
||||
-
|
||||
- //update diagnostics with json preset
|
||||
- NuxDeviceControl.instance()
|
||||
- .updateDiagnosticsData(includeJsonPreset: true);
|
||||
-
|
||||
- await Sentry.captureException(
|
||||
- error,
|
||||
- stackTrace: stackTrace,
|
||||
- );
|
||||
- });
|
||||
- } else {
|
||||
prefs.waitLoading().then((value) {
|
||||
mainRunApp();
|
||||
});
|
||||
- }
|
||||
}
|
||||
|
||||
mainRunApp() {
|
||||
diff --git a/windows/flutter/generated_plugin_registrant.cc b/windows/flutter/generated_plugin_registrant.cc
|
||||
index 2272406..ea9364d 100644
|
||||
--- a/windows/flutter/generated_plugin_registrant.cc
|
||||
+++ b/windows/flutter/generated_plugin_registrant.cc
|
||||
@@ -6,12 +6,21 @@
|
||||
|
||||
#include "generated_plugin_registrant.h"
|
||||
|
||||
+#include <app_links/app_links_plugin_c_api.h>
|
||||
+#include <permission_handler_windows/permission_handler_windows_plugin.h>
|
||||
#include <sentry_flutter/sentry_flutter_plugin.h>
|
||||
+#include <share_plus/share_plus_windows_plugin_c_api.h>
|
||||
#include <url_launcher_windows/url_launcher_windows.h>
|
||||
|
||||
void RegisterPlugins(flutter::PluginRegistry* registry) {
|
||||
+ AppLinksPluginCApiRegisterWithRegistrar(
|
||||
+ registry->GetRegistrarForPlugin("AppLinksPluginCApi"));
|
||||
+ PermissionHandlerWindowsPluginRegisterWithRegistrar(
|
||||
+ registry->GetRegistrarForPlugin("PermissionHandlerWindowsPlugin"));
|
||||
SentryFlutterPluginRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("SentryFlutterPlugin"));
|
||||
+ SharePlusWindowsPluginCApiRegisterWithRegistrar(
|
||||
+ registry->GetRegistrarForPlugin("SharePlusWindowsPluginCApi"));
|
||||
UrlLauncherWindowsRegisterWithRegistrar(
|
||||
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
|
||||
}
|
||||
diff --git a/windows/flutter/generated_plugins.cmake b/windows/flutter/generated_plugins.cmake
|
||||
index 33f774d..73cb8f2 100644
|
||||
--- a/windows/flutter/generated_plugins.cmake
|
||||
+++ b/windows/flutter/generated_plugins.cmake
|
||||
@@ -3,7 +3,10 @@
|
||||
#
|
||||
|
||||
list(APPEND FLUTTER_PLUGIN_LIST
|
||||
+ app_links
|
||||
+ permission_handler_windows
|
||||
sentry_flutter
|
||||
+ share_plus
|
||||
url_launcher_windows
|
||||
)
|
||||
|
||||
Loading…
Reference in a new issue