mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-10-21 02:03:44 +02:00
Merge pull request #1334 from ImranR98/dev
- De-emphasize 'reset install status' button to avoid confusion - Minor bugfix (#1331)
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(
|
||||
onPressed: !updating &&
|
||||
(app?.app.installedVersion == null ||
|
||||
@@ -403,16 +391,6 @@ class _AppPageState extends State<AppPage> {
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
children: [
|
||||
if (app?.app.installedVersion != null &&
|
||||
app?.app.installedVersion != app?.app.latestVersion &&
|
||||
!isVersionDetectionStandard &&
|
||||
!trackOnly)
|
||||
IconButton(
|
||||
onPressed: app?.downloadProgress != null || updating
|
||||
? null
|
||||
: showMarkUpdatedDialog,
|
||||
tooltip: tr('markUpdated'),
|
||||
icon: const Icon(Icons.done)),
|
||||
if (source != null &&
|
||||
source.combinedAppSpecificSettingFormItems.isNotEmpty)
|
||||
IconButton(
|
||||
@@ -458,14 +436,30 @@ class _AppPageState extends State<AppPage> {
|
||||
},
|
||||
icon: const Icon(Icons.more_horiz),
|
||||
tooltip: tr('more')),
|
||||
if (app?.app.installedVersion != null &&
|
||||
app?.app.installedVersion != app?.app.latestVersion &&
|
||||
!isVersionDetectionStandard &&
|
||||
!trackOnly)
|
||||
IconButton(
|
||||
onPressed: app?.downloadProgress != null || updating
|
||||
? null
|
||||
: showMarkUpdatedDialog,
|
||||
tooltip: tr('markUpdated'),
|
||||
icon: const Icon(Icons.done)),
|
||||
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),
|
||||
Expanded(
|
||||
child: (!isVersionDetectionStandard || trackOnly) &&
|
||||
app?.app.installedVersion != null &&
|
||||
app?.app.installedVersion ==
|
||||
app?.app.latestVersion
|
||||
? getResetInstallStatusButton()
|
||||
: getInstallOrUpdateButton()),
|
||||
Expanded(child: getInstallOrUpdateButton()),
|
||||
const SizedBox(width: 16.0),
|
||||
IconButton(
|
||||
onPressed: app?.downloadProgress != null || updating
|
||||
|
@@ -243,7 +243,9 @@ Future<File> downloadFile(
|
||||
tempDownloadedFile.deleteSync(recursive: true);
|
||||
throw response.reasonPhrase ?? tr('unexpectedError');
|
||||
}
|
||||
tempDownloadedFile.renameSync(downloadedFile.path);
|
||||
if (tempDownloadedFile.existsSync()) {
|
||||
tempDownloadedFile.renameSync(downloadedFile.path);
|
||||
}
|
||||
} else {
|
||||
client.close();
|
||||
}
|
||||
|
12
pubspec.lock
12
pubspec.lock
@@ -482,10 +482,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: mime
|
||||
sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e
|
||||
sha256: "2e123074287cc9fd6c09de8336dae606d1ddb88d9ac47358826db698c176a1f2"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "1.0.4"
|
||||
version: "1.0.5"
|
||||
nested:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -751,10 +751,10 @@ packages:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: sqflite
|
||||
sha256: "591f1602816e9c31377d5f008c2d9ef7b8aca8941c3f89cc5fd9d84da0c38a9a"
|
||||
sha256: c2c32eb0c74021d987336522acc3b6bf0082fbd0c540c36a9cf4ddb8ba891ddc
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
version: "2.3.1"
|
||||
sqflite_common:
|
||||
dependency: transitive
|
||||
description:
|
||||
@@ -927,10 +927,10 @@ packages:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: webview_flutter_android
|
||||
sha256: "161af93c2abaf94ef2192bffb53a3658b2d721a3bf99b69aa1e47814ee18cc96"
|
||||
sha256: "4ea3c4e1b8ed590162b15b8a61b41b1ef3ff179a314627c16ce40c086d94b8af"
|
||||
url: "https://pub.dev"
|
||||
source: hosted
|
||||
version: "3.13.2"
|
||||
version: "3.14.0"
|
||||
webview_flutter_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@@ -17,7 +17,7 @@ publish_to: 'none' # Remove this line if you wish to publish to pub.dev
|
||||
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
|
||||
# In Windows, build-name is used as the major, minor, and patch parts
|
||||
# of the product and file versions while build-number is used as the build suffix.
|
||||
version: 0.16.1+249 # When changing this, update the tag in main() accordingly
|
||||
version: 1.0.0+250 # When changing this, update the tag in main() accordingly
|
||||
|
||||
environment:
|
||||
sdk: '>=3.0.0 <4.0.0'
|
||||
|
Reference in New Issue
Block a user