Skip to content

Commit 0e3a8c9

Browse files
committed
Uwp now deselects list items on move, so we have to reselect it
1 parent d72b7fd commit 0e3a8c9

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

Signal-Windows/ViewModels/MainPageViewModel.cs

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,7 @@ internal void RepositionConversation(SignalConversation uiConversation)
134134
int index = Conversations.IndexOf(uiConversation);
135135
Logger.LogDebug("RepositionConversation() moving conversation from {0} to {1}", index, i);
136136
Conversations.Move(index, i);
137+
SelectedConversation = uiConversation;
137138
break;
138139
}
139140
}
@@ -161,12 +162,16 @@ public void ConversationsList_SelectionChanged(object sender, SelectionChangedEv
161162
{
162163
if (e.AddedItems.Count == 1)
163164
{
164-
Logger.LogDebug("ContactsList_SelectionChanged()");
165-
WelcomeVisibility = Visibility.Collapsed;
166-
ThreadVisibility = Visibility.Visible;
167-
SelectedThread = SelectedConversation;
168-
View.Thread.Load(SelectedThread);
169-
View.SwitchToStyle(View.GetCurrentViewStyle());
165+
var conversation = e.AddedItems[0];
166+
if (conversation != SelectedThread)
167+
{
168+
Logger.LogDebug("ContactsList_SelectionChanged()");
169+
WelcomeVisibility = Visibility.Collapsed;
170+
ThreadVisibility = Visibility.Visible;
171+
SelectedThread = SelectedConversation;
172+
View.Thread.Load(SelectedThread);
173+
View.SwitchToStyle(View.GetCurrentViewStyle());
174+
}
170175
}
171176
}
172177

0 commit comments

Comments
 (0)