flowkey / UIKit-cross-platform

Cross-platform Swift implementation of UIKit, mostly for Android
MIT License
598 stars 40 forks source link

Improve Touch (Part 1 - Timestamps) #282

Closed rikner closed 4 years ago

rikner commented 5 years ago

Fixes #217

Type of change:

Motivation (current vs expected behavior)

SDL's touch handling makes it impossible to get accurate timestamps on events, which breaks our velocity scrolling and causes other weird behaviour.

Also manually tested on my Android phone πŸ‘

Please check if the PR fulfills these requirements

ephemer commented 4 years ago

@rikner it would be awesome if you could provide an update whether this is still relevant, still builds, and still works as expected. From looking quickly at the code it seems like we should be able to merge this πŸ‘

rikner commented 4 years ago

@ephemer Yeah, I will take care of this very very soon.

rikner commented 4 years ago

@ephemer merged master and tested this on my phone. velocity scrolling now reliably works and I also compared the CPU usage with the master branch, which was exactly the same πŸ‘

codecov[bot] commented 4 years ago

Codecov Report

:exclamation: No coverage uploaded for pull request base (master@0ce2db4). Click here to learn what that means. The diff coverage is 45.58%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #282   +/-   ##
=========================================
  Coverage          ?   51.16%           
=========================================
  Files             ?       87           
  Lines             ?     3223           
  Branches          ?        0           
=========================================
  Hits              ?     1649           
  Misses            ?     1574           
  Partials          ?        0
Impacted Files Coverage Ξ”
Sources/UIScreen.swift 9.09% <ΓΈ> (ΓΈ)
Sources/UIView+animate.swift 78.37% <ΓΈ> (ΓΈ)
Sources/UIApplicationDelegate.swift 0% <ΓΈ> (ΓΈ)
Sources/UINavigationBarAndroid.swift 57.14% <ΓΈ> (ΓΈ)
Sources/AVPlayerItem+Mac.swift 0% <ΓΈ> (ΓΈ)
Sources/UIWindow.swift 71.05% <ΓΈ> (ΓΈ)
Sources/UIAlertAction.swift 0% <ΓΈ> (ΓΈ)
Sources/SDL2-Shims.swift 0% <ΓΈ> (ΓΈ)
Sources/DisplayLink.swift 0% <0%> (ΓΈ)
Sources/UIViewAnimationGroup.swift 63.63% <0%> (ΓΈ)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more Ξ” = absolute <relative> (impact), ΓΈ = not affected, ? = missing data Powered by Codecov. Last update 0ce2db4...327a804. Read the comment docs.

rikner commented 4 years ago

@janek πŸ’―