mirror of
https://github.com/element-hq/element-x-ios.git
synced 2025-03-10 13:37:11 +00:00
Fix out of bounds crashes on homescreen disclosure groups, stopped logging passwords :D
This commit is contained in:
parent
1fbdff55fc
commit
cfc24cd48d
@ -48,7 +48,7 @@ final class LoginScreenCoordinator: Coordinator, Presentable {
|
||||
loginScreenHostingController.isModalInPresentation = true
|
||||
|
||||
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 }
|
||||
self.completion?(result)
|
||||
}
|
||||
|
@ -36,19 +36,19 @@ struct HomeScreenViewState: BindableState {
|
||||
var isLoadingRooms: Bool = false
|
||||
|
||||
var firstDirectRooms: [HomeScreenRoom] {
|
||||
Array(rooms.filter { $0.isDirect }.prefix(upTo: 5))
|
||||
Array(rooms.filter { $0.isDirect }.prefix(5))
|
||||
}
|
||||
|
||||
var otherDirectRooms: [HomeScreenRoom] {
|
||||
Array(rooms.filter { $0.isDirect }.suffix(from: 5))
|
||||
Array(rooms.filter { $0.isDirect }.dropFirst(5))
|
||||
}
|
||||
|
||||
var firstNondirectRooms: [HomeScreenRoom] {
|
||||
Array(rooms.filter { !$0.isDirect }.prefix(upTo: 5))
|
||||
Array(rooms.filter { !$0.isDirect }.prefix(5))
|
||||
}
|
||||
|
||||
var otherNondirectRooms: [HomeScreenRoom] {
|
||||
Array(rooms.filter { !$0.isDirect }.suffix(from: 5))
|
||||
Array(rooms.filter { !$0.isDirect }.dropFirst(5))
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user