Move left pane entirely to React

This commit is contained in:
Scott Nonnenberg 2019-01-14 13:49:58 -08:00
parent bf904ddd12
commit b3ac1373fa
142 changed files with 5016 additions and 3428 deletions

View file

@ -1146,7 +1146,7 @@ async function getAllGroupsInvolvingId(id) {
return map(rows, row => jsonToObject(row.json));
}
async function searchConversations(query) {
async function searchConversations(query, { limit } = {}) {
const rows = await db.all(
`SELECT json FROM conversations WHERE
(
@ -1154,11 +1154,13 @@ async function searchConversations(query) {
name LIKE $name OR
profileName LIKE $profileName
)
ORDER BY id ASC;`,
ORDER BY id ASC
LIMIT $limit`,
{
$id: `%${query}%`,
$name: `%${query}%`,
$profileName: `%${query}%`,
$limit: limit || 50,
}
);