mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-15 19:38:10 +02:00
De-emphasize 'reset install status' button to avoid confusion
This commit is contained in:
@@ -347,18 +347,6 @@ class _AppPageState extends State<AppPage> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getResetInstallStatusButton() => TextButton(
|
|
||||||
onPressed: app?.app == null || updating
|
|
||||||
? null
|
|
||||||
: () {
|
|
||||||
app!.app.installedVersion = null;
|
|
||||||
appsProvider.saveApps([app.app]);
|
|
||||||
},
|
|
||||||
child: Text(
|
|
||||||
tr('resetInstallStatus'),
|
|
||||||
textAlign: TextAlign.center,
|
|
||||||
));
|
|
||||||
|
|
||||||
getInstallOrUpdateButton() => TextButton(
|
getInstallOrUpdateButton() => TextButton(
|
||||||
onPressed: !updating &&
|
onPressed: !updating &&
|
||||||
(app?.app.installedVersion == null ||
|
(app?.app.installedVersion == null ||
|
||||||
@@ -458,14 +446,20 @@ class _AppPageState extends State<AppPage> {
|
|||||||
},
|
},
|
||||||
icon: const Icon(Icons.more_horiz),
|
icon: const Icon(Icons.more_horiz),
|
||||||
tooltip: tr('more')),
|
tooltip: tr('more')),
|
||||||
|
if ((!isVersionDetectionStandard || trackOnly) &&
|
||||||
|
app?.app.installedVersion != null &&
|
||||||
|
app?.app.installedVersion == app?.app.latestVersion)
|
||||||
|
IconButton(
|
||||||
|
onPressed: app?.app == null || updating
|
||||||
|
? null
|
||||||
|
: () {
|
||||||
|
app!.app.installedVersion = null;
|
||||||
|
appsProvider.saveApps([app.app]);
|
||||||
|
},
|
||||||
|
icon: const Icon(Icons.restore_rounded),
|
||||||
|
tooltip: tr('resetInstallStatus')),
|
||||||
const SizedBox(width: 16.0),
|
const SizedBox(width: 16.0),
|
||||||
Expanded(
|
Expanded(child: getInstallOrUpdateButton()),
|
||||||
child: (!isVersionDetectionStandard || trackOnly) &&
|
|
||||||
app?.app.installedVersion != null &&
|
|
||||||
app?.app.installedVersion ==
|
|
||||||
app?.app.latestVersion
|
|
||||||
? getResetInstallStatusButton()
|
|
||||||
: getInstallOrUpdateButton()),
|
|
||||||
const SizedBox(width: 16.0),
|
const SizedBox(width: 16.0),
|
||||||
IconButton(
|
IconButton(
|
||||||
onPressed: app?.downloadProgress != null || updating
|
onPressed: app?.downloadProgress != null || updating
|
||||||
|
Reference in New Issue
Block a user