Page MenuHomePhabricator

[native] Scrolling to the edited message
ClosedPublic

Authored by kuba on Apr 18 2023, 3:17 AM.
Tags
None
Referenced Files
F2110251: D7484.id25675.diff
Tue, Jun 25, 7:10 PM
Unknown Object (File)
Mon, Jun 24, 10:40 AM
Unknown Object (File)
Mon, Jun 24, 7:20 AM
Unknown Object (File)
Thu, Jun 20, 12:35 PM
Unknown Object (File)
Fri, Jun 14, 7:12 AM
Unknown Object (File)
Thu, Jun 13, 8:12 AM
Unknown Object (File)
Fri, Jun 7, 1:46 AM
Unknown Object (File)
Mon, Jun 3, 7:23 AM
Subscribers

Details

Summary

Added ability to scroll to the currently edited message.

Test Plan

Tested only on iOS (waiting for android to compile, but have problems with it). Entered edit mode.

  1. Pressed the preview of the currently edited message. The list scrolled to the edited message. Tested a few times.
  1. Artificial changed the key of the message, so it doesn't exist in the list. Pressed preview of the currently edited message, the warning appeared in the console as expected.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

kuba added inline comments.
native/chat/chat-list.react.js
286 ↗(On Diff #25256)

I created it this way, because:

flatList.scrollToItem({ item: key, animated: true });

didn't work.

On Android TouchableOpacity caused a visual glitch.

Fixed glitch on Android, swapped View and TouchableOpacity order

This revision is now accepted and ready to land.Apr 20 2023, 5:18 AM