New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sort by Recently Used #10
Conversation
… sort those first
@@ -105,6 +112,36 @@ ipcMain.on("typeEmoji", (_event, arg) => { | |||
robot.typeString(arg); | |||
}); | |||
|
|||
// Return filtered and sorted emojis based on a search query | |||
ipcMain.handle("getEmojisForSearchString", (_event, arg) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since the LRU Map is defined in main.js instead of index.js, it made sense to do the filtering and sorting here and pass along that array to index.js.
app/macos/main.js
Outdated
let tray = undefined; | ||
let window = undefined; | ||
|
||
// Let's preset our LRU Map that we'll use to keep track of recent uses | ||
let lruMap = new LRUMap(10); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We want the LRU Map in main.js instead of index.js to persist the object across its entire runtime, not restart every time the modal pops up.
@tomershvueli, this looks absolutely amazing! It works flawlessly on my MacBook. I'll test it on Windows and Linux then go ahead with the merge. |
@tomershvueli, I tried doing |
@virejdasani take a look after the latest few pulls, I believe I fixed the |
This looks awesome and works perfectly across all operating systems. |
This is an interesting thought! I would be cautious because the colon key can also be used regularly without trying to type emojis sometimes. Would you be able to trigger it using a colon followed by any letter of the alphabet or a |
I'll try to make it so that if there is a letter typed after the colon, then it triggers Geniemoji and automatically writes that letter in the search box so |
I think that sounds awesome! Would love to see that in action! |
@tomershvueli, today was a holiday so I had some free time to implement the feature. It's in the master branch right now! I haven't packaged the app yet so you'll have to |
@virejdasani neat! 2 things that might make this just perfect:
|
Thanks, I'm working on it now, I'll let you know once it's done 👍 |
@tomershvueli, It finally works as expected now! Check it out and let me know, thanks a lot! |
Looks great!
Besides that, this is looking great! |
Thanks a bunch! |
I decided to hold off on the colon feature because it was presenting too many bugs and entirely not working on windows and linux. I think ctlr+e is fine for now. Maybe in a future update, I'll implement this feature. Anyways, thanks a lot for your help! |
@virejdasani I totally understand that, as this is starting to get into the territory of implementing things that Electron wasn't exactly built for... happy to give any input as needed in the future! |
Thanks a lot :) |
Hey @virejdasani !
This is a PR to support the following improvements that we discussed over email:
Happy to hear your thoughts!
No rush on this since I know you're busy.