mirror of
https://github.com/ImranR98/Obtainium.git
synced 2025-08-23 22:49:30 +02:00
App edit bugfixes
This commit is contained in:
@@ -283,50 +283,53 @@ class _AppPageState extends State<AppPage> {
|
|||||||
);
|
);
|
||||||
}).then((values) {
|
}).then((values) {
|
||||||
if (app != null && values != null) {
|
if (app != null && values != null) {
|
||||||
var changedApp = app.app;
|
Map<String, dynamic>
|
||||||
changedApp.additionalSettings =
|
originalSettings =
|
||||||
values;
|
app.app.additionalSettings;
|
||||||
|
app.app.additionalSettings = values;
|
||||||
if (source.enforceTrackOnly) {
|
if (source.enforceTrackOnly) {
|
||||||
changedApp.additionalSettings[
|
app.app.additionalSettings[
|
||||||
'trackOnly'] = true;
|
'trackOnly'] = true;
|
||||||
showError(
|
showError(
|
||||||
tr('appsFromSourceAreTrackOnly'),
|
tr('appsFromSourceAreTrackOnly'),
|
||||||
context);
|
context);
|
||||||
}
|
}
|
||||||
if (changedApp.additionalSettings[
|
if (app.app.additionalSettings[
|
||||||
'releaseDateAsVersion'] ==
|
'releaseDateAsVersion'] ==
|
||||||
true) {
|
true) {
|
||||||
changedApp.additionalSettings[
|
app.app.additionalSettings[
|
||||||
'noVersionDetection'] = true;
|
'noVersionDetection'] = true;
|
||||||
if (app.app.additionalSettings[
|
if (originalSettings[
|
||||||
'releaseDateAsVersion'] !=
|
'releaseDateAsVersion'] !=
|
||||||
true) {
|
true) {
|
||||||
if (app.app.releaseDate != null) {
|
if (app.app.releaseDate != null) {
|
||||||
changedApp.latestVersion = app
|
bool isUpdated =
|
||||||
|
app.app.installedVersion ==
|
||||||
|
app.app.latestVersion;
|
||||||
|
app.app.latestVersion = app
|
||||||
.app
|
.app
|
||||||
.releaseDate!
|
.releaseDate!
|
||||||
.microsecondsSinceEpoch
|
.microsecondsSinceEpoch
|
||||||
.toString();
|
.toString();
|
||||||
if (app.app.installedVersion ==
|
if (isUpdated) {
|
||||||
app.app.latestVersion) {
|
app.app.installedVersion =
|
||||||
changedApp.installedVersion =
|
app.app.latestVersion;
|
||||||
changedApp.latestVersion;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (app.app.additionalSettings[
|
} else if (originalSettings[
|
||||||
'releaseDateAsVersion'] ==
|
'releaseDateAsVersion'] ==
|
||||||
true) {
|
true) {
|
||||||
changedApp.additionalSettings[
|
app.app.additionalSettings[
|
||||||
'noVersionDetection'] = false;
|
'noVersionDetection'] = false;
|
||||||
changedApp.installedVersion = app
|
app.app.installedVersion = app
|
||||||
.installedInfo
|
.installedInfo
|
||||||
?.versionName ??
|
?.versionName ??
|
||||||
changedApp.installedVersion;
|
app.app.installedVersion;
|
||||||
}
|
}
|
||||||
appsProvider.saveApps(
|
appsProvider.saveApps([app.app]).then(
|
||||||
[changedApp]).then((value) {
|
(value) {
|
||||||
getUpdate(changedApp.id);
|
getUpdate(app.app.id);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
Reference in New Issue
Block a user