File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -844,7 +844,6 @@ def setup(self, controller):
844
844
# Handle source related messages.
845
845
self .controller .message_ready .connect (self .set_snippet )
846
846
self .controller .reply_ready .connect (self .set_snippet )
847
- self .controller .reply_succeeded .connect (self .set_snippet )
848
847
self .controller .file_ready .connect (self .set_snippet )
849
848
850
849
def update (self , sources : List [Source ]):
@@ -1765,16 +1764,17 @@ def _set_reply_state(self, status: str) -> None:
1765
1764
elif status == 'PENDING' :
1766
1765
self .setStyleSheet (self .CSS_REPLY_PENDING )
1767
1766
1768
- @pyqtSlot (str )
1769
- def _on_reply_success (self , message_id : str ) -> None :
1767
+ @pyqtSlot (str , str )
1768
+ def _on_reply_success (self , message_id : str , new_reply_id : str ) -> None :
1770
1769
"""
1771
1770
Conditionally update this ReplyWidget's state if and only if the message_id of the emitted
1772
1771
signal matches the message_id of this widget.
1773
1772
"""
1774
1773
if message_id == self .message_id :
1775
- logger . debug ( 'Message {} succeeded' . format ( message_id ))
1774
+ self . message_id = new_reply_id
1776
1775
self ._set_reply_state ('SUCCEEDED' )
1777
1776
1777
+
1778
1778
@pyqtSlot (str )
1779
1779
def _on_reply_failure (self , message_id : str ) -> None :
1780
1780
"""
Original file line number Diff line number Diff line change @@ -101,10 +101,10 @@ class Controller(QObject):
101
101
sync_events = pyqtSignal (str )
102
102
103
103
"""
104
- Signal that notifies that a reply was accepted by the server. Emits the reply's
105
- UUID and content as a string.
104
+ Signal that notifies that a reply was accepted by the server. Emits the reply's draft UUID and
105
+ UUID as a string.
106
106
"""
107
- reply_succeeded = pyqtSignal ([str , str , str ])
107
+ reply_succeeded = pyqtSignal ([str , str ])
108
108
109
109
"""
110
110
Signal that notifies that a reply failed to be accepted by the server. Emits the reply's UUID
@@ -782,7 +782,8 @@ def on_reply_success(self, reply_uuid: str) -> None:
782
782
self .gui .clear_error_status () # remove any permanent error status message
783
783
self .session .commit ()
784
784
reply = storage .get_reply (self .session , reply_uuid )
785
- self .reply_succeeded .emit (reply .source .uuid , reply_uuid , reply .content )
785
+ self .reply_succeeded .emit (reply_uuid , reply .uuid )
786
+ self .reply_ready .emit (reply .source .uuid , reply .uuid , reply .content )
786
787
787
788
def on_reply_failure (
788
789
self ,
You can’t perform that action at this time.
0 commit comments