From dc9d80d2a84927119381eeee1b16e10099f08334 Mon Sep 17 00:00:00 2001
From: Samuel Newman <mozzius@protonmail.com>
Date: Fri, 24 May 2024 19:59:28 +0100
Subject: [🐴] update convo list from message bus (#4189)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

* update convo list from message bus

* don't increase unread count if you're the sender

* add refetch interval back

* Fix deleted message state copy

* only enable if `hasSession`

* Fix logged out handling

* increase refetch interval to 60s

* request 10s interval when message screen active

* use useAppState hook for convo resume/background

* Combine forces

* fix useFocusEffect logic

---------

Co-authored-by: Eric Bailey <git@esb.lol>
---
 src/state/messages/index.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src/state/messages/index.tsx')

diff --git a/src/state/messages/index.tsx b/src/state/messages/index.tsx
index 04ace8d60..a379c5513 100644
--- a/src/state/messages/index.tsx
+++ b/src/state/messages/index.tsx
@@ -2,13 +2,16 @@ import React from 'react'
 
 import {CurrentConvoIdProvider} from '#/state/messages/current-convo-id'
 import {MessagesEventBusProvider} from '#/state/messages/events'
+import {ListConvosProvider} from '#/state/queries/messages/list-converations'
 import {MessageDraftsProvider} from './message-drafts'
 
 export function MessagesProvider({children}: {children: React.ReactNode}) {
   return (
     <CurrentConvoIdProvider>
       <MessageDraftsProvider>
-        <MessagesEventBusProvider>{children}</MessagesEventBusProvider>
+        <MessagesEventBusProvider>
+          <ListConvosProvider>{children}</ListConvosProvider>
+        </MessagesEventBusProvider>
       </MessageDraftsProvider>
     </CurrentConvoIdProvider>
   )
-- 
cgit 1.4.1

