commit 15ab9f713519e84f2925b138d846d29276b2f983
parent d4aa8a5602ccf9115377f0e2f5d41fab84220e29
Author: William Casarin <jb55@jb55.com>
Date: Tue, 1 Aug 2023 21:51:41 -0700
scroll: allow any hashable target
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/damus/Views/EventDetailView.swift b/damus/Views/EventDetailView.swift
@@ -21,7 +21,7 @@ struct EventDetailView_Previews: PreviewProvider {
}
}
-func scroll_to_event(scroller: ScrollViewProxy, id: String, delay: Double, animate: Bool, anchor: UnitPoint = .bottom) {
+func scroll_to_event<ID: Hashable>(scroller: ScrollViewProxy, id: ID, delay: Double, animate: Bool, anchor: UnitPoint = .bottom) {
DispatchQueue.main.asyncAfter(deadline: .now() + delay) {
if animate {
withAnimation {