@@ -1357,11 +1357,6 @@ def set_snippet(
1357
1357
if self .deleting or self .deleting_conversation :
1358
1358
return
1359
1359
1360
- # If the sync started before the deletion finished, then the sync is stale and we do
1361
- # not want to update the source widget.
1362
- if self .sync_started_timestamp < self .deletion_scheduled_timestamp :
1363
- return
1364
-
1365
1360
# If the source collection is empty yet the interaction_count is greater than zero, then we
1366
1361
# known that the conversation has been deleted.
1367
1362
if not self .source .server_collection :
@@ -2984,18 +2979,15 @@ def _on_conversation_deletion_successful(self, source_uuid: str, timestamp: date
2984
2979
logger .debug (f"Could not update ConversationView: { e } " )
2985
2980
2986
2981
def update_deletion_markers (self ) -> None :
2987
- try :
2988
- if self .source .collection :
2989
- self .scroll .show ()
2990
- if self .source .collection [0 ].file_counter > 1 :
2991
- self .deleted_conversation_marker .hide ()
2992
- self .deleted_conversation_items_marker .show ()
2993
- elif self .source .interaction_count > 0 :
2994
- self .scroll .hide ()
2995
- self .deleted_conversation_items_marker .hide ()
2996
- self .deleted_conversation_marker .show ()
2997
- except sqlalchemy .exc .InvalidRequestError as e :
2998
- logger .debug (f"Could not Update deletion markers in the ConversationView: { e } " )
2982
+ if self .source .collection :
2983
+ self .scroll .show ()
2984
+ if self .source .collection [0 ].file_counter > 1 :
2985
+ self .deleted_conversation_marker .hide ()
2986
+ self .deleted_conversation_items_marker .show ()
2987
+ elif self .source .interaction_count > 0 :
2988
+ self .scroll .hide ()
2989
+ self .deleted_conversation_items_marker .hide ()
2990
+ self .deleted_conversation_marker .show ()
2999
2991
3000
2992
def update_conversation (self , collection : list ) -> None :
3001
2993
"""
@@ -3016,11 +3008,6 @@ def update_conversation(self, collection: list) -> None:
3016
3008
passed into this method in case of a mismatch between where the widget
3017
3009
has been and now is in terms of its index in the conversation.
3018
3010
"""
3019
- # If the sync started before the deletion finished, then the sync is stale and we do
3020
- # not want to update the conversation.
3021
- if self .sync_started_timestamp < self .deletion_scheduled_timestamp :
3022
- return
3023
-
3024
3011
self .controller .session .refresh (self .source )
3025
3012
3026
3013
# Keep a temporary copy of the current conversation so we can delete any
@@ -3157,7 +3144,7 @@ def add_reply(self, reply: Union[DraftReply, Reply], sender: User, index: int) -
3157
3144
self .scroll .add_widget_to_conversation (index , conversation_item , Qt .AlignRight )
3158
3145
self .current_messages [reply .uuid ] = conversation_item
3159
3146
3160
- def on_reply_sent (self , source_uuid : str , reply_uuid : str , reply_text : str ) -> None :
3147
+ def on_reply_sent (self , source_uuid : str ) -> None :
3161
3148
"""
3162
3149
Add the reply text sent from ReplyBoxWidget to the conversation.
3163
3150
"""
@@ -3167,7 +3154,6 @@ def on_reply_sent(self, source_uuid: str, reply_uuid: str, reply_text: str) -> N
3167
3154
self .update_conversation (self .source .collection )
3168
3155
except sqlalchemy .exc .InvalidRequestError as e :
3169
3156
logger .debug (e )
3170
- self .update_deletion_markers ()
3171
3157
3172
3158
3173
3159
class SourceConversationWrapper (QWidget ):
@@ -3311,7 +3297,7 @@ class ReplyBoxWidget(QWidget):
3311
3297
A textbox where a journalist can enter a reply.
3312
3298
"""
3313
3299
3314
- reply_sent = pyqtSignal (str , str , str )
3300
+ reply_sent = pyqtSignal (str )
3315
3301
3316
3302
def __init__ (self , source : Source , controller : Controller ) -> None :
3317
3303
super ().__init__ ()
@@ -3408,7 +3394,7 @@ def send_reply(self) -> None:
3408
3394
self .text_edit .setText ("" )
3409
3395
reply_uuid = str (uuid4 ())
3410
3396
self .controller .send_reply (self .source .uuid , reply_uuid , reply_text )
3411
- self .reply_sent .emit (self .source .uuid , reply_uuid , reply_text )
3397
+ self .reply_sent .emit (self .source .uuid )
3412
3398
3413
3399
@pyqtSlot (bool )
3414
3400
def _on_authentication_changed (self , authenticated : bool ) -> None :
0 commit comments