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:
William Casarin
2022-08-09 09:32:22 -07:00
parent ff6f2a61ac
commit eec8763733
6 changed files with 72 additions and 19 deletions

View 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()
}
}