|
1 | 1 | # A part of NonVisual Desktop Access (NVDA) |
2 | | -# Copyright (C) 2022-2023 NV Access Limited, Cyrille Bougot |
| 2 | +# Copyright (C) 2022-2025 NV Access Limited, Cyrille Bougot |
3 | 3 | # This file is covered by the GNU General Public License. |
4 | 4 | # See the file COPYING for more details. |
5 | 5 |
|
@@ -93,9 +93,15 @@ class AddonListField(_AddonListFieldData, Enum): |
93 | 93 | ) |
94 | 94 | publicationDate = ( |
95 | 95 | # Translators: The name of the column that contains the publication date of the add-on. |
96 | | - pgettext("addonStore", "Publication Date"), |
| 96 | + pgettext("addonStore", "Publication date"), |
97 | 97 | 50, |
98 | 98 | ) |
| 99 | + installDate = ( |
| 100 | + # Translators: The name of the column that contains the installation date of the add-on. |
| 101 | + pgettext("addonStore", "Install date"), |
| 102 | + 50, |
| 103 | + frozenset({_StatusFilterKey.AVAILABLE, _StatusFilterKey.UPDATE}), |
| 104 | + ) |
99 | 105 | minimumNVDAVersion = ( |
100 | 106 | # Translators: The name of the column that contains the minimum version of NVDA required for this add-on. |
101 | 107 | pgettext("addonStore", "Minimum NVDA version"), |
@@ -309,6 +315,8 @@ def _getAddonFieldText(self, listItemVM: AddonListItemVM, field: AddonListField) |
309 | 315 | return listItemVM.status.displayString |
310 | 316 | if field is AddonListField.channel: |
311 | 317 | return listItemVM.model.channel.displayString |
| 318 | + if field is AddonListField.installDate: |
| 319 | + return listItemVM.model.installDate.strftime("%x") |
312 | 320 | if field is AddonListField.minimumNVDAVersion: |
313 | 321 | return formatVersionForGUI(*listItemVM.model.minimumNVDAVersion) |
314 | 322 | if field is AddonListField.lastTestedVersion: |
@@ -403,6 +411,8 @@ def _getSortFieldData(listItemVM: AddonListItemVM) -> "SupportsLessThan": |
403 | 411 | if getattr(listItemVM.model, "submissionTime", None): |
404 | 412 | return listItemVM.model.submissionTime |
405 | 413 | return 0 |
| 414 | + if self._sortByModelField == AddonListField.installDate: |
| 415 | + return listItemVM.model.installDate |
406 | 416 | return strxfrm(self._getAddonFieldText(listItemVM, self._sortByModelField)) |
407 | 417 |
|
408 | 418 | def _containsTerm(detailsVM: AddonListItemVM, term: str) -> bool: |
|
0 commit comments