mirror of https://github.com/lukechilds/damus.git
Browse Source
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>profile-edit
William Casarin
2 years ago
6 changed files with 72 additions and 19 deletions
@ -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() |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue