-
Notifications
You must be signed in to change notification settings - Fork 3
Make the amount of scrollback configurable #3
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
Open
cbehan
wants to merge
13
commits into
NickBeeuwsaert:master
Choose a base branch
from
cbehan:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
People with a less active slack team might not want to check it every week. Especially one that is used with a proof-of-concept client. This keeps the one week default but allows the user to change it. Signed-off-by: Connor Behan <[email protected]>
To avoid a large download, we can save messages to a log and only fetch messages newer than the newest file in the log. This adds basic support but there is an inefficient step. Due to closing brackets in the JSON format, it is not possible to keep the log updated by appending lines. We have to sort and overwrite. Signed-off-by: Connor Behan <[email protected]>
Having to keep changing the directory where loaf is called gets annoying. Signed-off-by: Connor Behan <[email protected]>
Writing only the new messages might be hard but sorting only the new messages is easy. Signed-off-by: Connor Behan <[email protected]>
The obvious thing to do is to write new messages to the log file one line at a time. In other words, a given line is valid JSON but the file as a whole is not. Signed-off-by: Connor Behan <[email protected]>
Git bisect blamed this on urwid's breaking change of 2023-04-21. Scheduling the redraw function to be called on the display of new messages seems like a good fix. Signed-off-by: Connor Behan <[email protected]>
These additional key errors that one sometimes hits are probably caused by users who have deleted their accounts but not their old messages. Signed-off-by: Connor Behan <[email protected]>
Adding this specifier to the API call is easy. But it means some of the conversations will not have a name. For now it is fine to skip this. Signed-off-by: Connor Behan <[email protected]>
The users associated with IM type conversations can easily be looked up. Signed-off-by: Connor Behan <[email protected]>
Messages are added to the GUI because the RTM client listens to them. If sending a message does this explicitly as well then it will create the illusion of double posts. Signed-off-by: Connor Behan <[email protected]>
When a top-level message is added to the GUI, the set of replies it has (if any) will now be fetched and added underneath. So far, these are displayed in a different colour so people know they are not messages of a type that we can currently send. Signed-off-by: Connor Behan <[email protected]>
We did not need to write this extra stuff. Signed-off-by: Connor Behan <[email protected]>
Now it is only newly fetched messages which have their replies fetched. They are then put into a sensible sorting order and logged so that all messages can be on the same footing when they are added to the GUI. Signed-off-by: Connor Behan <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
People with a less active slack team might not want to check it every
week. Especially one that is used with a proof-of-concept client. This
keeps the one week default but allows the user to change it.
Signed-off-by: Connor Behan [email protected]