mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Avatar Bloom View in home screen navigation bar (#1630)
* experimental code * veyr close to a perfect solution but i need to make it crop * code improvementds * for now this looks like the best solution but there is a weird animation happening * hard edge solution that completely works. * dark mode support * 17 support * code improvement and dark mode improvement * bloom gradient, it works but it needs a fix for landscape + the gradient should get hidden while in search mode * hides when searching * crash free constraint * fixed everything only the scroll bar issue needs fixing now * oblique gradient effect * removed unused code * removed unused code * updated the bloom effects * hairline restored for everything aside from the home screen * code improvements * possible final implementation * pr suggestion * hairline view added * Update ElementX/Sources/Other/ScrollViewAdapter.swift Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> * Apply suggestions from code review Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com> * code adjustments * typo fix * typo fix --------- Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
@@ -49,11 +49,19 @@ class ScrollViewAdapter: NSObject, UIScrollViewDelegate {
|
||||
.eraseToAnyPublisher()
|
||||
}
|
||||
|
||||
private let isAtTopEdgeSubject: CurrentValueSubject<Bool, Never> = .init(false)
|
||||
var isAtTopEdge: CurrentValuePublisher<Bool, Never> {
|
||||
isAtTopEdgeSubject
|
||||
.asCurrentValuePublisher()
|
||||
}
|
||||
|
||||
// MARK: - UIScrollViewDelegate
|
||||
|
||||
func scrollViewDidScroll(_ scrollView: UIScrollView) {
|
||||
didScrollSubject.send(())
|
||||
updateScrollDirection(scrollView)
|
||||
let insetContentOffset = scrollView.contentOffset.y + scrollView.contentInset.top
|
||||
isAtTopEdgeSubject.send(insetContentOffset >= 3)
|
||||
}
|
||||
|
||||
func scrollViewWillBeginDragging(_ scrollView: UIScrollView) {
|
||||
|
||||
Reference in New Issue
Block a user