You've already forked matrix-react-sdk
							
							
				mirror of
				https://github.com/matrix-org/matrix-react-sdk.git
				synced 2025-11-04 11:51:45 +03:00 
			
		
		
		
	Change thread panel filtering (#7169)
This commit is contained in:
		@@ -73,15 +73,13 @@ const useFilteredThreadsTimelinePanel = ({
 | 
			
		||||
    const buildThreadList = useCallback(function(timelineSet: EventTimelineSet) {
 | 
			
		||||
        timelineSet.resetLiveTimeline("");
 | 
			
		||||
        Array.from(threads)
 | 
			
		||||
            .map(([, thread]) => thread)
 | 
			
		||||
            .forEach(thread => {
 | 
			
		||||
                const ownEvent = thread.rootEvent.getSender() === userId;
 | 
			
		||||
                if (filterOption !== ThreadFilterType.My || ownEvent) {
 | 
			
		||||
            .forEach(([, thread]) => {
 | 
			
		||||
                if (filterOption !== ThreadFilterType.My || thread.hasCurrentUserParticipated) {
 | 
			
		||||
                    timelineSet.addLiveEvent(thread.rootEvent);
 | 
			
		||||
                }
 | 
			
		||||
            });
 | 
			
		||||
        updateTimeline();
 | 
			
		||||
    }, [filterOption, threads, updateTimeline, userId]);
 | 
			
		||||
    }, [filterOption, threads, updateTimeline]);
 | 
			
		||||
 | 
			
		||||
    useEffect(() => { buildThreadList(timelineSet); }, [timelineSet, buildThreadList]);
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user