mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-18 23:48:29 +02:00
- Fixed - Other minor code / UI tweaks
This commit is contained in:
@@ -29,7 +29,7 @@ class MatrixItemChooserRoomAncestorsDataSource: MatrixItemChooserDataSource {
|
||||
let ancestorsIds = session.spaceService.ancestorsPerRoomId[roomId] ?? []
|
||||
completion(Result(catching: {
|
||||
return [
|
||||
MatrixListItemSectionData(title: VectorL10n.roomAccessSpaceChooserKnownSpacesSection(session.room(withRoomId: roomId)?.displayName ?? ""), infoText: nil, items: ancestorsIds.compactMap { spaceId in
|
||||
MatrixListItemSectionData(title: VectorL10n.roomAccessSpaceChooserKnownSpacesSection(session.room(withRoomId: roomId)?.displayName ?? ""), items: ancestorsIds.compactMap { spaceId in
|
||||
guard let space = session.spaceService.getSpace(withId: spaceId) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class MatrixItemChooserRoomDirectParentsDataSource: MatrixItemChooserDataSource
|
||||
|
||||
completion(Result(catching: {
|
||||
return [
|
||||
MatrixListItemSectionData(title: VectorL10n.roomAccessSpaceChooserKnownSpacesSection(session.room(withRoomId: roomId)?.displayName ?? ""), infoText: nil, items: ancestorsIds.compactMap { spaceId in
|
||||
MatrixListItemSectionData(title: VectorL10n.roomAccessSpaceChooserKnownSpacesSection(session.room(withRoomId: roomId)?.displayName ?? ""), items: ancestorsIds.compactMap { spaceId in
|
||||
guard let space = session.spaceService.getSpace(withId: spaceId) else {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -50,7 +50,6 @@ class MatrixItemChooserRoomRestrictedAllowedParentsDataSource: MatrixItemChooser
|
||||
var sections = [
|
||||
MatrixListItemSectionData(
|
||||
title: VectorL10n.roomAccessSpaceChooserKnownSpacesSection(room.displayName ?? ""),
|
||||
infoText: nil,
|
||||
items: ancestorsId.compactMap { spaceId in
|
||||
guard let space = session.spaceService.getSpace(withId: spaceId) else {
|
||||
return nil
|
||||
|
||||
@@ -22,7 +22,7 @@ class MatrixItemChooserRoomsDataSource: MatrixItemChooserDataSource {
|
||||
func sections(with session: MXSession, completion: @escaping (Result<[MatrixListItemSectionData], Error>) -> Void) {
|
||||
completion(Result(catching: {
|
||||
[
|
||||
MatrixListItemSectionData(title: nil, infoText: nil, items: session.rooms.compactMap { room in
|
||||
MatrixListItemSectionData(items: session.rooms.compactMap { room in
|
||||
if room.summary.roomType == .space || room.isDirect {
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -136,7 +136,7 @@ class MatrixItemChooserService: MatrixItemChooserServiceProtocol {
|
||||
itemsProcessor.isItemIncluded($0) && ($0.id.lowercased().contains(lowercasedSearchText) || ($0.displayName ?? "").lowercased().contains(lowercasedSearchText))
|
||||
}
|
||||
}
|
||||
newSections.append(MatrixListItemSectionData(title: section.title, infoText: section.infoText, items: items))
|
||||
newSections.append(MatrixListItemSectionData(id: section.id, title: section.title, infoText: section.infoText, items: items))
|
||||
}
|
||||
|
||||
return newSections
|
||||
|
||||
@@ -22,7 +22,7 @@ class MatrixItemChooserUsersDataSource: MatrixItemChooserDataSource {
|
||||
func sections(with session: MXSession, completion: @escaping (Result<[MatrixListItemSectionData], Error>) -> Void) {
|
||||
completion(Result(catching: {
|
||||
[
|
||||
MatrixListItemSectionData(title: nil, infoText: nil, items: session.users().map { user in
|
||||
MatrixListItemSectionData(items: session.users().map { user in
|
||||
MatrixListItemData(mxUser: user)
|
||||
})
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user