-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Traders chat #3165
Traders chat #3165
Conversation
On the way to adding chat for traders this is a first step. Mainly just moving functionality out of TraderDisputeView to Chat class. There are still remaining dispute functionality that needs to be factored away.
The naming of DisputeCommunicationMessage has to stay but they otherwise fit what would be more aptly named ChatCommunicationMessage or something in that spririt.
Add extra button for generically added button in chat
Move session classes to core. Break out DisputeCommunicationMessage handling from DisputeManager and put in ChatMananger prepare for other uses of ChatManager. Renaming of DisputeCommunicationMessage would be nice but it's representing the protobuf messages so the name has to stay.
- Add communication messages to Trade protobuf message to be able to save chat messages per trade - Add Type enum and field to DisputeCommunicationMessage protobuf to be able to dispatch Dispute and Trade chat messages properly - Rename some function as isClient instead of isTrader to make it easier to understand who is who when two traders are communicating with each other
Very basic switch between chat and overview per trade, improvements needed on the UI.
# Conflicts: # core/src/main/java/bisq/core/arbitration/DisputeManager.java # core/src/main/java/bisq/core/arbitration/messages/DisputeCommunicationMessage.java # core/src/main/java/bisq/core/trade/Trade.java
- Close already open chat if new one opens
# Conflicts: # desktop/src/main/java/bisq/desktop/main/disputes/trader/TraderDisputeView.java
- Fix logger - Manage display state off trade chat msg (wip)
I agree. None of the mentioned improvements sound critical for the first release. Better to release the thinnest vertically complete features possible. |
@chimp1984 Looking great already! I'll give it a spin and provide feedback soon. |
…sign icon and add additional cleanup code
I just did more in-depth testing and everything works as expected. Also having arbitration case in parallel to the trader chat for a specific message doesn't cause any issues. Great work @sqrrm and @chimp1984 👍 If that is done I'm happy to merge this PR to master. |
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.
Text looks good to me overall...just a potential issue with links (see comment).
Co-Authored-By: Steve Jain <[email protected]>
Co-Authored-By: Steve Jain <[email protected]>
- Store last position of the chat window so if it gets closed and opened again it opens at the last position. - Fix issues with the listener for new messages. The handler was called multiple times before. Now its is called only once. Tested with multiple trades and scrolling. We use maps for each trade to avoid multiple listener registrations when switching views. With current implementation we avoid that but we do not remove listeners when a trade is removed (completed) but that has no consequences as we will not receive any message anyway from a closed trade. Supporting it more correctly would require more effort and managing listener deactivation at screen switches (currently we get the update called if we have selected another view. This part can be improved if any dev feels motivated but its not trivial...
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.
ACK
@@ -316,6 +316,19 @@ private void openChat(Trade trade) { | |||
if (chatPopupStage != null) | |||
chatPopupStage.close(); | |||
|
|||
if (trade.getCommunicationMessages().isEmpty()) { |
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.
This will make receivers of messages from peers not see the code of conduct message
Based on PR #2871 from @sqrrm.
I share the PR so that others can add optimisations for design and wording.
Open questions:
I think all the above is not needed, at least not for a first release. But some UI beautification (@ripcurlx) and better wording (@m52go) would be nice...