HaikuDepot: Issue with Version Dates
Resolves an issue where package version dates are not updated in the UI as they are updated in the model. Change-Id: Ic21954f91abb9c6f9bf0907500e189215adb70de Reviewed-on: https://review.haiku-os.org/c/haiku/+/5333 Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org> Reviewed-by: Jérôme Duval <jerome.duval@gmail.com>
This commit is contained in:
parent
eb9ff8e5a7
commit
7d137fd96a
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* Copyright 2013-2014, Stephan Aßmus <superstippi@gmx.de>.
|
||||
* Copyright 2013, Rene Gollent <rene@gollent.com>.
|
||||
* Copyright 2016-2021, Andrew Lindesay <apl@lindesay.co.nz>.
|
||||
* Copyright 2016-2022, Andrew Lindesay <apl@lindesay.co.nz>.
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
|
||||
@ -1016,7 +1016,10 @@ PackageInfo::SetViewed()
|
||||
void
|
||||
PackageInfo::SetVersionCreateTimestamp(uint64 value)
|
||||
{
|
||||
fVersionCreateTimestamp = value;
|
||||
if (fVersionCreateTimestamp != value) {
|
||||
fVersionCreateTimestamp = value;
|
||||
_NotifyListeners(PKG_CHANGED_VERSION_CREATE_TIMESTAMP);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
/*
|
||||
* Copyright 2013, Stephan Aßmus <superstippi@gmx.de>.
|
||||
* Copyright 2022, Andrew Lindesay <apl@lindesay.co.nz>.
|
||||
* All rights reserved. Distributed under the terms of the MIT License.
|
||||
*/
|
||||
#ifndef PACKAGE_INFO_LISTENER_H
|
||||
@ -10,19 +11,20 @@
|
||||
|
||||
|
||||
enum {
|
||||
PKG_CHANGED_TITLE = 1 << 0,
|
||||
PKG_CHANGED_SUMMARY = 1 << 1,
|
||||
PKG_CHANGED_DESCRIPTION = 1 << 2,
|
||||
PKG_CHANGED_RATINGS = 1 << 3,
|
||||
PKG_CHANGED_SCREENSHOTS = 1 << 4,
|
||||
PKG_CHANGED_STATE = 1 << 5,
|
||||
PKG_CHANGED_ICON = 1 << 6,
|
||||
PKG_CHANGED_CHANGELOG = 1 << 7,
|
||||
PKG_CHANGED_CATEGORIES = 1 << 8,
|
||||
PKG_CHANGED_PROMINENCE = 1 << 9,
|
||||
PKG_CHANGED_SIZE = 1 << 10,
|
||||
PKG_CHANGED_DEPOT = 1 << 11,
|
||||
PKG_CHANGED_VERSION = 1 << 12
|
||||
PKG_CHANGED_TITLE = 1 << 0,
|
||||
PKG_CHANGED_SUMMARY = 1 << 1,
|
||||
PKG_CHANGED_DESCRIPTION = 1 << 2,
|
||||
PKG_CHANGED_RATINGS = 1 << 3,
|
||||
PKG_CHANGED_SCREENSHOTS = 1 << 4,
|
||||
PKG_CHANGED_STATE = 1 << 5,
|
||||
PKG_CHANGED_ICON = 1 << 6,
|
||||
PKG_CHANGED_CHANGELOG = 1 << 7,
|
||||
PKG_CHANGED_CATEGORIES = 1 << 8,
|
||||
PKG_CHANGED_PROMINENCE = 1 << 9,
|
||||
PKG_CHANGED_SIZE = 1 << 10,
|
||||
PKG_CHANGED_DEPOT = 1 << 11,
|
||||
PKG_CHANGED_VERSION = 1 << 12,
|
||||
PKG_CHANGED_VERSION_CREATE_TIMESTAMP = 1 << 13
|
||||
// ...
|
||||
};
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2018-2021, Andrew Lindesay, <apl@lindesay.co.nz>.
|
||||
* Copyright 2018-2022, Andrew Lindesay, <apl@lindesay.co.nz>.
|
||||
* Copyright 2017, Julian Harnath, <julian.harnath@rwth-aachen.de>.
|
||||
* Copyright 2015, Axel Dörfler, <axeld@pinc-software.de>.
|
||||
* Copyright 2013-2014, Stephan Aßmus <superstippi@gmx.de>.
|
||||
@ -966,6 +966,8 @@ PackageListView::MessageReceived(BMessage* message)
|
||||
row->UpdateRepository();
|
||||
if ((changes & PKG_CHANGED_VERSION) != 0)
|
||||
row->UpdateVersion();
|
||||
if ((changes & PKG_CHANGED_VERSION_CREATE_TIMESTAMP) != 0)
|
||||
row->UpdateVersionCreateTimestamp();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user