Comment updates

This commit is contained in:
Ali
2020-09-11 19:03:25 +01:00
parent 0fbc4f7009
commit 4b4f702883
14 changed files with 264 additions and 53 deletions

View File

@@ -14,6 +14,7 @@ enum ChatNavigationButtonAction: Equatable {
case search
case dismiss
case toggleInfoPanel
case spacer
}
struct ChatNavigationButton: Equatable {
@@ -92,7 +93,11 @@ func rightNavigationButtonForChatInterfaceState(_ presentationInterfaceState: Ch
return ChatNavigationButton(action: .search, buttonItem: buttonItem)
}
} else {
return nil
if case .spacer = currentButton?.action {
return currentButton
} else {
return ChatNavigationButton(action: .spacer, buttonItem: UIBarButtonItem(title: "", style: .plain, target: target, action: selector))
}
}
}
if case let .peer(peerId) = presentationInterfaceState.chatLocation {
@@ -106,7 +111,11 @@ func rightNavigationButtonForChatInterfaceState(_ presentationInterfaceState: Ch
return ChatNavigationButton(action: .search, buttonItem: buttonItem)
}
} else {
return nil
if case .spacer = currentButton?.action {
return currentButton
} else {
return ChatNavigationButton(action: .spacer, buttonItem: UIBarButtonItem(title: "", style: .plain, target: target, action: selector))
}
}
}
}