scroll: more consistent scrolling behavior
Scrolling will always anchor the active note to the top of the screen This is less confusing overall Changelog-Changed: Clicking on a note will now always scroll it to the top Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
32
damus/Components/EndBlock.swift
Normal file
32
damus/Components/EndBlock.swift
Normal file
@@ -0,0 +1,32 @@
|
||||
//
|
||||
// EndBlock.swift
|
||||
// damus
|
||||
//
|
||||
// Created by William Casarin on 2022-08-08.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
|
||||
struct EndBlock: View {
|
||||
let height: CGFloat
|
||||
|
||||
init () {
|
||||
self.height = 80.0
|
||||
}
|
||||
|
||||
init (height: Float) {
|
||||
self.height = CGFloat(height)
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
Color.white.opacity(0)
|
||||
.id("endblock")
|
||||
.frame(height: height)
|
||||
}
|
||||
}
|
||||
|
||||
struct EndBlock_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
EndBlock()
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user