From ced04e613a54eb66793157831c7c5eacb0b05da7 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Thu, 3 Jun 2021 23:39:20 -0500 Subject: [PATCH] Disallow deselecting conversation list item --- application/views/ConversationListView.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/application/views/ConversationListView.cpp b/application/views/ConversationListView.cpp index 428f206..fa4fb05 100644 --- a/application/views/ConversationListView.cpp +++ b/application/views/ConversationListView.cpp @@ -47,8 +47,14 @@ ConversationListView::MessageReceived(BMessage* msg) void ConversationListView::MouseDown(BPoint where) { + int32 selection = CurrentSelection(); + BListView::MouseDown(where); + // Don't allow deselcting a room + if (CurrentSelection() < 0 && selection >= 0) + Select(selection); + uint32 buttons = 0; Window()->CurrentMessage()->FindInt32("buttons", (int32*)&buttons);