@@ -34,6 +34,7 @@ public sealed partial class Conversation : UserControl, INotifyPropertyChanged
34
34
private Dictionary < long , SignalAttachmentContainer > UnfinishedAttachmentsCache = new Dictionary < long , SignalAttachmentContainer > ( ) ;
35
35
private SignalConversation SignalConversation ;
36
36
public VirtualizedCollection Collection ;
37
+ private int LastMarkReadRequest ;
37
38
38
39
private string _ThreadDisplayName ;
39
40
@@ -135,6 +136,7 @@ private void UpdateHeader(SignalConversation thread)
135
136
public void Load ( SignalConversation conversation )
136
137
{
137
138
SignalConversation = conversation ;
139
+ LastMarkReadRequest = - 1 ;
138
140
InputTextBox . IsEnabled = false ;
139
141
DisposeCurrentThread ( ) ;
140
142
UpdateHeader ( conversation ) ;
@@ -319,9 +321,11 @@ private void ConversationSettingsButton_Click(object sender, RoutedEventArgs e)
319
321
private void ScrollViewer_ViewChanged ( object sender , ScrollViewerViewChangedEventArgs e )
320
322
{
321
323
int bottomIndex = GetBottommostIndex ( ) ;
322
- if ( Window . Current . CoreWindow . ActivationMode == CoreWindowActivationMode . ActivatedInForeground
323
- && SignalConversation . LastSeenMessageIndex < bottomIndex )
324
+ if ( Window . Current . CoreWindow . ActivationMode == CoreWindowActivationMode . ActivatedInForeground &&
325
+ SignalConversation . LastSeenMessageIndex < bottomIndex &&
326
+ LastMarkReadRequest < bottomIndex )
324
327
{
328
+ LastMarkReadRequest = bottomIndex ;
325
329
Task . Run ( ( ) =>
326
330
{
327
331
App . Handle . SetMessageRead ( bottomIndex , SignalConversation ) ;
0 commit comments