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