Bug 464882 - Discover always shows 0 items in search heading
Summary: Discover always shows 0 items in search heading
Status: RESOLVED FIXED
Alias: None
Product: Discover
Classification: Applications
Component: discover (show other bugs)
Version: 5.26.90
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2023-01-26 22:40 UTC by Shubham Arora
Modified: 2023-02-01 01:01 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Issue Screenshot (142.82 KB, image/png)
2023-01-26 22:40 UTC, Shubham Arora
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Shubham Arora 2023-01-26 22:40:22 UTC
Created attachment 155690 [details]
Issue Screenshot

SUMMARY
On searching for an application in Discover 0 items are shown even though package list is loaded. On switching categories the count is correctly updated.


STEPS TO REPRODUCE
1.  Search for a package

OBSERVED RESULT
0 Count is shown

EXPECTED RESULT
Correct count is shown.


Operating System: EndeavourOS 
KDE Plasma Version: 5.26.90
KDE Frameworks Version: 5.102.0
Qt Version: 5.15.8
Kernel Version: 6.1.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 24 × AMD Ryzen 9 3900X 12-Core Processor
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: X570 AORUS ELITE
System Version: -CF
Comment 1 Nate Graham 2023-01-27 17:57:35 UTC
Can reproduce.
Comment 2 Bug Janitor Service 2023-01-31 00:31:13 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/discover/-/merge_requests/461
Comment 3 Aleix Pol 2023-02-01 00:58:11 UTC
Git commit 9462a8164369944e1e1f8d46f07c861c77c9e73d by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 01/02/2023 at 00:56.
Pushed by apol into branch 'master'.

ui: Fix plural calculation of app list page heading

We cannot use roughCount as the value for i18np(). It's a string and we
need a number.

As it's <1000 JS will be overly smart and convert the number into a string
but eventually we give "1000+" and then the conversion returns 0. Without
warnings. 👍

M  +1    -1    discover/qml/ApplicationsListPage.qml

https://invent.kde.org/plasma/discover/commit/9462a8164369944e1e1f8d46f07c861c77c9e73d
Comment 4 Aleix Pol 2023-02-01 01:01:21 UTC
Git commit a350da8e1b2899f13258c48f7f2c67e5b0d8b9ab by Aleix Pol Gonzalez, on behalf of Aleix Pol.
Committed on 01/02/2023 at 01:01.
Pushed by apol into branch 'Plasma/5.27'.

ui: Fix plural calculation of app list page heading

We cannot use roughCount as the value for i18np(). It's a string and we
need a number.

As it's <1000 JS will be overly smart and convert the number into a string
but eventually we give "1000+" and then the conversion returns 0. Without
warnings. 👍


(cherry picked from commit 9462a8164369944e1e1f8d46f07c861c77c9e73d)

M  +1    -1    discover/qml/ApplicationsListPage.qml

https://invent.kde.org/plasma/discover/commit/a350da8e1b2899f13258c48f7f2c67e5b0d8b9ab