mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-01 21:30:16 +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();
|
||||
|
||||
return GeneratedFormModal(
|
||||
title: tr('additionalOptions'),
|
||||
items: items,
|
||||
);
|
||||
title: tr('additionalOptions'), 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(
|
||||
onPressed: (app?.app.installedVersion == null ||
|
||||
app?.app.installedVersion != app?.app.latestVersion) &&
|
||||
@@ -402,7 +409,13 @@ class _AppPageState extends State<AppPage> {
|
||||
icon: const Icon(Icons.more_horiz),
|
||||
tooltip: tr('more')),
|
||||
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),
|
||||
Expanded(
|
||||
child: TextButton(
|
||||
|
Reference in New Issue
Block a user