mirror of
				https://github.com/ImranR98/Obtainium.git
				synced 2025-10-25 20:03:44 +02:00 
			
		
		
		
	Reduced haptic feedback (consequential actions only)
This commit is contained in:
		| @@ -59,14 +59,13 @@ class _GeneratedFormModalState extends State<GeneratedFormModal> { | ||||
|       actions: [ | ||||
|         TextButton( | ||||
|             onPressed: () { | ||||
|               HapticFeedback.lightImpact(); | ||||
|               Navigator.of(context).pop(null); | ||||
|             }, | ||||
|             child: const Text('Cancel')), | ||||
|         TextButton( | ||||
|             onPressed: () { | ||||
|               if (_formKey.currentState?.validate() == true) { | ||||
|                 HapticFeedback.heavyImpact(); | ||||
|                 HapticFeedback.selectionClick(); | ||||
|                 Navigator.of(context).pop(formInputs | ||||
|                     .map((e) => (e[0] as TextEditingController).value.text) | ||||
|                     .toList()); | ||||
|   | ||||
| @@ -60,7 +60,7 @@ class _AddAppPageState extends State<AddAppPage> { | ||||
|                               onPressed: gettingAppInfo | ||||
|                                   ? null | ||||
|                                   : () { | ||||
|                                       HapticFeedback.mediumImpact(); | ||||
|                                       HapticFeedback.selectionClick(); | ||||
|                                       if (_formKey.currentState!.validate()) { | ||||
|                                         setState(() { | ||||
|                                           gettingAppInfo = true; | ||||
|   | ||||
| @@ -111,6 +111,7 @@ class _AppPageState extends State<AppPage> { | ||||
|                                               child: const Text('No')), | ||||
|                                           TextButton( | ||||
|                                               onPressed: () { | ||||
|                                                 HapticFeedback.selectionClick(); | ||||
|                                                 var updatedApp = app?.app; | ||||
|                                                 if (updatedApp != null) { | ||||
|                                                   updatedApp.installedVersion = | ||||
| @@ -157,7 +158,6 @@ class _AppPageState extends State<AppPage> { | ||||
|                           onPressed: app?.downloadProgress != null | ||||
|                               ? null | ||||
|                               : () { | ||||
|                                   HapticFeedback.lightImpact(); | ||||
|                                   showDialog( | ||||
|                                       context: context, | ||||
|                                       builder: (BuildContext ctx) { | ||||
| @@ -168,7 +168,8 @@ class _AppPageState extends State<AppPage> { | ||||
|                                           actions: [ | ||||
|                                             TextButton( | ||||
|                                                 onPressed: () { | ||||
|                                                   HapticFeedback.heavyImpact(); | ||||
|                                                   HapticFeedback | ||||
|                                                       .selectionClick(); | ||||
|                                                   appsProvider | ||||
|                                                       .removeApp(app!.app.id) | ||||
|                                                       .then((_) { | ||||
| @@ -181,7 +182,6 @@ class _AppPageState extends State<AppPage> { | ||||
|                                                 child: const Text('Remove')), | ||||
|                                             TextButton( | ||||
|                                                 onPressed: () { | ||||
|                                                   HapticFeedback.lightImpact(); | ||||
|                                                   Navigator.of(context).pop(); | ||||
|                                                 }, | ||||
|                                                 child: const Text('Cancel')) | ||||
|   | ||||
| @@ -45,7 +45,7 @@ class _HomePageState extends State<HomePage> { | ||||
|                     NavigationDestination(icon: Icon(e.icon), label: e.title)) | ||||
|                 .toList(), | ||||
|             onDestinationSelected: (int index) { | ||||
|               HapticFeedback.lightImpact(); | ||||
|               HapticFeedback.selectionClick(); | ||||
|               setState(() { | ||||
|                 if (index == 0) { | ||||
|                   selectedIndexHistory.clear(); | ||||
|   | ||||
| @@ -57,7 +57,7 @@ class _ImportExportPageState extends State<ImportExportPage> { | ||||
|                       onPressed: appsProvider.apps.isEmpty || importInProgress | ||||
|                           ? null | ||||
|                           : () { | ||||
|                               HapticFeedback.lightImpact(); | ||||
|                               HapticFeedback.selectionClick(); | ||||
|                               appsProvider.exportApps().then((String path) { | ||||
|                                 ScaffoldMessenger.of(context).showSnackBar( | ||||
|                                   SnackBar(content: Text('Exported to $path')), | ||||
| @@ -72,7 +72,7 @@ class _ImportExportPageState extends State<ImportExportPage> { | ||||
|                       onPressed: importInProgress | ||||
|                           ? null | ||||
|                           : () { | ||||
|                               HapticFeedback.lightImpact(); | ||||
|                               HapticFeedback.selectionClick(); | ||||
|                               FilePicker.platform.pickFiles().then((result) { | ||||
|                                 setState(() { | ||||
|                                   importInProgress = true; | ||||
| @@ -291,7 +291,6 @@ class _ImportErrorDialogState extends State<ImportErrorDialog> { | ||||
|       actions: [ | ||||
|         TextButton( | ||||
|             onPressed: () { | ||||
|               HapticFeedback.lightImpact(); | ||||
|               Navigator.of(context).pop(null); | ||||
|             }, | ||||
|             child: const Text('Okay')) | ||||
|   | ||||
| @@ -192,7 +192,6 @@ class _SettingsPageState extends State<SettingsPage> { | ||||
|                                 }), | ||||
|                               ), | ||||
|                               onPressed: () { | ||||
|                                 HapticFeedback.lightImpact(); | ||||
|                                 launchUrlString(settingsProvider.sourceUrl, | ||||
|                                     mode: LaunchMode.externalApplication); | ||||
|                               }, | ||||
|   | ||||
| @@ -339,13 +339,12 @@ class _APKPickerState extends State<APKPicker> { | ||||
|       actions: [ | ||||
|         TextButton( | ||||
|             onPressed: () { | ||||
|               HapticFeedback.lightImpact(); | ||||
|               Navigator.of(context).pop(null); | ||||
|             }, | ||||
|             child: const Text('Cancel')), | ||||
|         TextButton( | ||||
|             onPressed: () { | ||||
|               HapticFeedback.heavyImpact(); | ||||
|               HapticFeedback.selectionClick(); | ||||
|               Navigator.of(context).pop(apkUrl); | ||||
|             }, | ||||
|             child: const Text('Continue')) | ||||
| @@ -376,13 +375,12 @@ class _APKOriginWarningDialogState extends State<APKOriginWarningDialog> { | ||||
|       actions: [ | ||||
|         TextButton( | ||||
|             onPressed: () { | ||||
|               HapticFeedback.lightImpact(); | ||||
|               Navigator.of(context).pop(null); | ||||
|             }, | ||||
|             child: const Text('Cancel')), | ||||
|         TextButton( | ||||
|             onPressed: () { | ||||
|               HapticFeedback.heavyImpact(); | ||||
|               HapticFeedback.selectionClick(); | ||||
|               Navigator.of(context).pop(true); | ||||
|             }, | ||||
|             child: const Text('Continue')) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user