Fix Messenger

This commit is contained in:
2026-02-24 14:47:03 +01:00
parent 9cd057e9e1
commit 3132fa3d97

View File

@@ -195,7 +195,7 @@ Public Class frmMessenger
Dim whereName = "" Dim whereName = ""
If MyTextBox1.Text.Trim <> String.Empty Then If MyTextBox1.Text.Trim <> String.Empty Then
whereName = " WHERE chat_name LIKE '%" & MyTextBox1.Text.Trim & "%' " whereName = " WHERE y.chat_name LIKE '%" & MyTextBox1.Text.Trim & "%' "
End If End If
Dim where = "" Dim where = ""
@@ -217,7 +217,7 @@ Public Class frmMessenger
) as T " & whereName & " ORDER BY chat_lastMsg DESC" ) as T " & whereName & " ORDER BY chat_lastMsg DESC"
Dim sqlQery_optimiced As String = "SELECT TOP 200 Dim sqlQery_optimiced As String = " SELECT * FROM (SELECT TOP 200
c.chat_id, c.chat_id,
CASE CASE
@@ -259,7 +259,7 @@ Public Class frmMessenger
WHERE msg.chatMg_chatId = c.chat_id WHERE msg.chatMg_chatId = c.chat_id
AND s.chatMgSt_MaId = " & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & " AND s.chatMgSt_MaId = " & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & "
AND s.chatMgSt_gelesen = 0 AND s.chatMgSt_gelesen = 0
) unread WHERE c.chat_aktiv = " & IIf(Not cbxInaktiveChats.Checked, 1, 0) & "" & where & "ORDER BY c.chat_lastMsg DESC" ) unread WHERE c.chat_aktiv = " & IIf(Not cbxInaktiveChats.Checked, 1, 0) & "" & where & "ORDER BY c.chat_lastMsg DESC) y " & whereName