mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-15 03:18:09 +02:00
App page 'reset install status' button shows if appropriate
This commit is contained in:
@@ -268,9 +268,7 @@ class _AppPageState extends State<AppPage> {
|
|||||||
}).toList();
|
}).toList();
|
||||||
|
|
||||||
return GeneratedFormModal(
|
return GeneratedFormModal(
|
||||||
title: tr('additionalOptions'),
|
title: tr('additionalOptions'), items: items);
|
||||||
items: items,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -307,6 +305,15 @@ class _AppPageState extends State<AppPage> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getResetInstallStatusButton() => TextButton(
|
||||||
|
onPressed: app?.app == null
|
||||||
|
? null
|
||||||
|
: () {
|
||||||
|
app!.app.installedVersion = null;
|
||||||
|
appsProvider.saveApps([app.app]);
|
||||||
|
},
|
||||||
|
child: Text(tr('resetInstallStatus')));
|
||||||
|
|
||||||
getInstallOrUpdateButton() => TextButton(
|
getInstallOrUpdateButton() => TextButton(
|
||||||
onPressed: (app?.app.installedVersion == null ||
|
onPressed: (app?.app.installedVersion == null ||
|
||||||
app?.app.installedVersion != app?.app.latestVersion) &&
|
app?.app.installedVersion != app?.app.latestVersion) &&
|
||||||
@@ -402,7 +409,13 @@ class _AppPageState extends State<AppPage> {
|
|||||||
icon: const Icon(Icons.more_horiz),
|
icon: const Icon(Icons.more_horiz),
|
||||||
tooltip: tr('more')),
|
tooltip: tr('more')),
|
||||||
const SizedBox(width: 16.0),
|
const SizedBox(width: 16.0),
|
||||||
Expanded(child: getInstallOrUpdateButton()),
|
Expanded(
|
||||||
|
child: !isVersionDetectionStandard &&
|
||||||
|
app?.app.installedVersion != null &&
|
||||||
|
app?.app.installedVersion ==
|
||||||
|
app?.app.latestVersion
|
||||||
|
? getResetInstallStatusButton()
|
||||||
|
: getInstallOrUpdateButton()),
|
||||||
const SizedBox(width: 16.0),
|
const SizedBox(width: 16.0),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: TextButton(
|
child: TextButton(
|
||||||
|
Reference in New Issue
Block a user