mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Move the global search shortcut to application commands so it's more reliable with multiple windows
This commit is contained in:
committed by
Stefan Ceriu
parent
d4e3b11486
commit
a010306b41
@@ -34,7 +34,6 @@ enum HomeScreenCoordinatorAction {
|
||||
case presentRecoveryKeyScreen
|
||||
case presentEncryptionResetScreen
|
||||
case presentStartChatScreen
|
||||
case presentGlobalSearch
|
||||
case logout
|
||||
}
|
||||
|
||||
@@ -90,8 +89,6 @@ final class HomeScreenCoordinator: CoordinatorProtocol {
|
||||
actionsSubject.send(.presentEncryptionResetScreen)
|
||||
case .presentStartChatScreen:
|
||||
actionsSubject.send(.presentStartChatScreen)
|
||||
case .presentGlobalSearch:
|
||||
actionsSubject.send(.presentGlobalSearch)
|
||||
case .logout:
|
||||
actionsSubject.send(.logout)
|
||||
case .transferOwnership(let roomIdentifier):
|
||||
|
||||
@@ -25,7 +25,6 @@ enum HomeScreenViewModelAction {
|
||||
case presentSettingsScreen
|
||||
case presentFeedbackScreen
|
||||
case presentStartChatScreen
|
||||
case presentGlobalSearch
|
||||
case logout
|
||||
}
|
||||
|
||||
@@ -44,7 +43,6 @@ enum HomeScreenViewAction {
|
||||
case skipRecoveryKeyConfirmation
|
||||
case dismissNewSoundBanner
|
||||
case updateVisibleItemRange(Range<Int>)
|
||||
case globalSearch
|
||||
case spaceFilters
|
||||
case markRoomAsUnread(roomIdentifier: String)
|
||||
case markRoomAsRead(roomIdentifier: String)
|
||||
|
||||
@@ -199,8 +199,6 @@ class HomeScreenViewModel: HomeScreenViewModelType, HomeScreenViewModelProtocol
|
||||
roomSummaryProvider?.updateVisibleRange(range)
|
||||
case .startChat:
|
||||
actionsSubject.send(.presentStartChatScreen)
|
||||
case .globalSearch:
|
||||
actionsSubject.send(.presentGlobalSearch)
|
||||
case .spaceFilters:
|
||||
if spaceFilterSubject.value != nil {
|
||||
spaceFilterSubject.send(nil)
|
||||
|
||||
@@ -99,12 +99,6 @@ struct HomeScreenContent: View {
|
||||
scrollView.setContentOffset(oldOffset, animated: false)
|
||||
}
|
||||
}
|
||||
.background {
|
||||
Button("") {
|
||||
context.send(viewAction: .globalSearch)
|
||||
}
|
||||
.keyboardShortcut(KeyEquivalent("k"), modifiers: [.command])
|
||||
}
|
||||
.overlay {
|
||||
if context.viewState.shouldShowEmptyFilterState {
|
||||
RoomListFiltersEmptyStateView(state: context.filtersState)
|
||||
|
||||
Reference in New Issue
Block a user