mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-10-31 16:24:11 +00:00
Fix out of bounds crashes on homescreen disclosure groups, stopped logging passwords :D
This commit is contained in:
@@ -48,7 +48,7 @@ final class LoginScreenCoordinator: Coordinator, Presentable {
|
|||||||
loginScreenHostingController.isModalInPresentation = true
|
loginScreenHostingController.isModalInPresentation = true
|
||||||
|
|
||||||
loginScreenViewModel.completion = { [weak self] result in
|
loginScreenViewModel.completion = { [weak self] result in
|
||||||
MXLog.debug("[LoginScreenCoordinator] LoginScreenViewModel did complete with result: \(result).")
|
MXLog.debug("[LoginScreenCoordinator] LoginScreenViewModel did complete.")
|
||||||
guard let self = self else { return }
|
guard let self = self else { return }
|
||||||
self.completion?(result)
|
self.completion?(result)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -36,19 +36,19 @@ struct HomeScreenViewState: BindableState {
|
|||||||
var isLoadingRooms: Bool = false
|
var isLoadingRooms: Bool = false
|
||||||
|
|
||||||
var firstDirectRooms: [HomeScreenRoom] {
|
var firstDirectRooms: [HomeScreenRoom] {
|
||||||
Array(rooms.filter { $0.isDirect }.prefix(upTo: 5))
|
Array(rooms.filter { $0.isDirect }.prefix(5))
|
||||||
}
|
}
|
||||||
|
|
||||||
var otherDirectRooms: [HomeScreenRoom] {
|
var otherDirectRooms: [HomeScreenRoom] {
|
||||||
Array(rooms.filter { $0.isDirect }.suffix(from: 5))
|
Array(rooms.filter { $0.isDirect }.dropFirst(5))
|
||||||
}
|
}
|
||||||
|
|
||||||
var firstNondirectRooms: [HomeScreenRoom] {
|
var firstNondirectRooms: [HomeScreenRoom] {
|
||||||
Array(rooms.filter { !$0.isDirect }.prefix(upTo: 5))
|
Array(rooms.filter { !$0.isDirect }.prefix(5))
|
||||||
}
|
}
|
||||||
|
|
||||||
var otherNondirectRooms: [HomeScreenRoom] {
|
var otherNondirectRooms: [HomeScreenRoom] {
|
||||||
Array(rooms.filter { !$0.isDirect }.suffix(from: 5))
|
Array(rooms.filter { !$0.isDirect }.dropFirst(5))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user