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:
Mauro
2023-09-08 16:45:48 +02:00
committed by GitHub
parent dedfb9394f
commit 3ce26a9faf
4 changed files with 161 additions and 9 deletions
@@ -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) {