Bug 454733

Summary: Custom Emojis can't be created
Product: [Applications] NeoChat Reporter: Jan Bidler <janbidler00>
Component: GeneralAssignee: Tobias Fella <fella>
Status: RESOLVED FIXED    
Severity: normal CC: carl
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description Jan Bidler 2022-06-02 10:25:12 UTC
SUMMARY
The "create custom emojis" feature seems to not work.

STEPS TO REPRODUCE
1. Open app and sign yourself in
2. Go to Settings -> Custom Emoji
3. Type in a name and upload a picture of a wished custom emoji

OBSERVED RESULT
After the picture has been selected, no emoji seems to get added. The name for the custom emoji is still in the textbox, and the "Upload image" button does not react anymore until the settings are closed and reopened.

EXPECTED RESULT
After the picture has been selected, a custom emoji should have been created.

SOFTWARE/OS VERSIONS
 - **Distribution / Platform:** Windows 10 21H2, Android 7
 - **Qt Version:** 5.15.2
 - **NeoChat version:** 22.04
 - **Quotient version:** None shown in Settings
 - **Matrix server:** Account on matrix.org, issue is irrelevant to server of rooms.

ADDITIONAL INFORMATION
This gets printed in the console from the moment I click the "upload Image" button, until I confirm my Image selection:
```
qrc:/imports/NeoChat/Settings/Emoticons.qml:117: ReferenceError: StandardPaths is not defined
qrc:/imports/NeoChat/Settings/Emoticons.qml:99: ReferenceError: emojiField is not defined
```
The responsible lines of code are here:  
https://invent.kde.org/network/neochat/-/blob/master/imports/NeoChat/Settings/Emoticons.qml#L117  
https://invent.kde.org/network/neochat/-/blob/master/imports/NeoChat/Settings/Emoticons.qml#L99