Bug 443974

Summary: 'Clear history' in Emoji Selector doesn't clear permanently
Product: [Plasma] plasmashell Reporter: Gabriel <gabriel>
Component: Emoji SelectorAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: nate
Priority: NOR    
Version: 5.23.0   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.23.1
Attachments: Video showcasing the steps and result

Description Gabriel 2021-10-18 12:50:55 UTC
Created attachment 142578 [details]
Video showcasing the steps and result

SUMMARY
When clearing the recent history in the emoji selector, the history gets wiped visually, but reappears upon restart.

STEPS TO REPRODUCE
1. Open the Emoji Selector on the 'Recent' tab
2. Click 'Clear history'
3. Close the Emoji Selector
4. Reopen and view the 'Recent' tab

OBSERVED RESULT
The cleared items have returned

EXPECTED RESULT
There is no recent history to display

SOFTWARE
OS: KDE neon 5.23
KDE Plasma Version: 5.23.0
KDE Frameworks Version: 5.87.0
Qt Version: 5.15.3

ADDITIONAL INFORMATION
Clearing and then adding new emojis does keep the previous ones from reappearing. It simply doesn't like being completely empty. ¯\_(ツ)_/¯
Comment 1 Nate Graham 2021-10-18 16:37:19 UTC
Oy vey.
Comment 2 Nate Graham 2021-10-18 17:41:52 UTC
Looks like recentEmojiModel.clearHistory() doesn't actually commit the changes to the config file where recent emojis are stored.
Comment 3 Bug Janitor Service 2021-10-18 17:46:28 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/plasma-desktop/-/merge_requests/606
Comment 4 Nate Graham 2021-10-18 18:46:45 UTC
Git commit 58f29efd5d2975129c07dcdc4a9eb78669c5eb67 by Nate Graham.
Committed on 18/10/2021 at 18:46.
Pushed by ngraham into branch 'master'.

Fix "clear emoji history" action

It wasn't saving the cleared config entry to the config file, so any
changes to the view (i.e. to make all the emojis disappear) would be
un-done when you closed the window and then re-opened it.
FIXED-IN: 5.23.1

M  +2    -0    applets/kimpanel/backend/ibus/emojier/emojierplugin.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/58f29efd5d2975129c07dcdc4a9eb78669c5eb67
Comment 5 Nate Graham 2021-10-18 18:47:16 UTC
Git commit 839f6bc0cf42620ef5f22224b1761ee303203413 by Nate Graham.
Committed on 18/10/2021 at 18:47.
Pushed by ngraham into branch 'Plasma/5.23'.

Fix "clear emoji history" action

It wasn't saving the cleared config entry to the config file, so any
changes to the view (i.e. to make all the emojis disappear) would be
un-done when you closed the window and then re-opened it.
FIXED-IN: 5.23.1


(cherry picked from commit 58f29efd5d2975129c07dcdc4a9eb78669c5eb67)

M  +2    -0    applets/kimpanel/backend/ibus/emojier/emojierplugin.cpp

https://invent.kde.org/plasma/plasma-desktop/commit/839f6bc0cf42620ef5f22224b1761ee303203413