-
Notifications
You must be signed in to change notification settings - Fork 24
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
Load backlog from Discord. #12
Comments
Looks like this was commented out in 8800f81. Are there plans to support it again in the future? |
Yeah... might have to do significant refactoring, though. See here :( |
I see; that's unfortunate. I'll follow that issue as well. If I knew Rust at all I'd offer to help out. |
I've actually been tinkering with this; at the moment I have some code that pulls on init the last N messages from each channel and prints them to the corresponding buffer with the correct timestamp. Further steps are mostly getting the last read message from each channel in order to pull the logs from there onward (it should be listed in the initial ReadyEvent, I think) and then moving everything to a separate thread. An option to toggle this behavior would also probably be in order. Then it would be reasonable to implement issue #9 to have a complete synchronization mechanism, but that's going to be an adventure. To be honest it's already been an adventure, since I've just picked up Rust with this :p |
Rather, more than using a thread to load everything asynchronously at startup (which was my understanding of what you meant on the other thread, @khyperia ), it might be nice to load the backlog only when the corresponding buffer is actually accessed in WC by the user. It would cause a lag spike at that moment, sure, but it should be tolerable and would avoid issues of interleaving with new messages arriving while the backlogs are being pulled and printed. Of course this requires more FFI wrappers to catch the corresponding WC signal, but that's also imho the biggest obstacle with issue #9 so it's something that needs to be done sooner or later. |
On startup pull backlog from the server and disregard the log on disk.
The text was updated successfully, but these errors were encountered: