scrollSignalData static method
The reply data for a scroll: post with the merged signal, dropping unknownReason once movement decided changed.
Implementation
static Map<String, Object?> scrollSignalData(
PostActionState post, ({bool? changed, String category}) merged, double? movedPx) {
final data = post.toData();
if (merged.changed != null) {
data
..['changed'] = merged.changed
..remove('unknownReason');
}
return {
...data,
'changeCategory': merged.category,
if (movedPx != null) 'scrolledPx': movedPx.round(),
};
}