Adds clearing to directParentNames
This commit is contained in:
		
							parent
							
								
									b437996208
								
							
						
					
					
						commit
						e003bc973a
					
				@ -224,6 +224,7 @@ internal class RoomSummaryUpdater @Inject constructor(
 | 
			
		||||
                    .sort(RoomSummaryEntityFields.ROOM_ID)
 | 
			
		||||
                    .findAll().map {
 | 
			
		||||
                        it.flattenParentIds = null
 | 
			
		||||
                        it.directParentNames.clear()
 | 
			
		||||
                        it to emptyList<RoomSummaryEntity>().toMutableSet()
 | 
			
		||||
                    }
 | 
			
		||||
                    .toMap()
 | 
			
		||||
 | 
			
		||||
@ -207,7 +207,7 @@ class RoomSummaryItemFactory @Inject constructor(
 | 
			
		||||
 | 
			
		||||
    private fun getSearchResultSubtitle(roomSummary: RoomSummary): String {
 | 
			
		||||
        val userId = roomSummary.directUserId
 | 
			
		||||
        val directParent = roomSummary.directParentNames.lastOrNull()
 | 
			
		||||
        val directParent = roomSummary.directParentNames.takeIf { it.isNotEmpty() }?.joinToString()
 | 
			
		||||
        val canonicalAlias = roomSummary.canonicalAlias
 | 
			
		||||
 | 
			
		||||
        return (userId ?: directParent ?: canonicalAlias).orEmpty()
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user