Page MenuHomePhorge

Lift the save as dialog to the RoomPage to prevent ListView updates from destroying it
Needs ReviewPublic

Authored by nannanko on Sat, May 23, 10:00 PM.
Tags
None
Referenced Files
F84680321: D304.1781512692.diff
Sun, Jun 14, 1:38 AM
F84680319: D304.1781512691.diff
Sun, Jun 14, 1:38 AM
F84676699: D304.1781507524.diff
Sun, Jun 14, 12:12 AM
F84670974: D304.1781497689.diff
Sat, Jun 13, 9:28 PM
F84666432: D304.1781482617.diff
Sat, Jun 13, 5:16 PM
F84654318: D304.1781446599.diff
Sat, Jun 13, 7:16 AM
F84645962: D304.1781428710.diff
Sat, Jun 13, 2:18 AM
Subscribers
None

Details

Summary

Save as dialog will disappear if someone sends other messages, this diff fixed it.

Type: fix

Test Plan
  1. Open the Save As dialog
  2. Receive a new message from another user
  3. The dialog should no longer disappear

Diff Detail

Repository
rK kazv
Branch
nannanko/filedialog-crash
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 630
Build 1242: Invoke BuildbotBuildbot build #1854
Build 1241: arc lint + arc unit

Event Timeline

Please add a changelog type to the summary, using the following format:

Type: (add|remove|skip|security|fix)

Harbormaster returned this revision to the author for changes because remote builds failed.Sat, May 23, 10:35 PM
Harbormaster failed remote builds in B618: Diff 950!
Harbormaster returned this revision to the author for changes because remote builds failed.Sat, May 30, 1:42 PM
Harbormaster failed remote builds in B620: Diff 953!
tusooa requested changes to this revision.Tue, Jun 9, 12:42 PM
tusooa added inline comments.
src/contents/ui/RoomPage.qml
57

This is O(N) in time complexity. First, do we really need to have the EventView? Is there a way to avoid having to use it? Second, even if we really need it, we can do a binary search to reduce the time complexity to O(logN).

src/contents/ui/RoomTimelineView.qml
189

I am afraid this may not always return a meaningful value, as the requested event may not currently be displayed -- then there may not be an Item associated with this index (because of virtual scrolling)

This revision now requires changes to proceed.Tue, Jun 9, 12:42 PM
src/contents/ui/RoomTimelineView.qml
189

I know, but that's not a problem. Because a newly created event will automatically look for its KazvIOJob. Here we just need to find those events that have been created and notify them that the download has started.

src/contents/ui/RoomPage.qml
57

As I replied in another comment, we only need to look for events within the visible range, so binary search is not needed either, I will modify here later

When starting to download, only search the corresponding event in the loaded events.

src/contents/ui/RoomPage.qml
57

add relevant comment here

src/contents/ui/RoomTimelineView.qml
184–190

remove unneeded function

src/contents/ui/EventView.qml
43

would downloadStarted be a better name?

Modify startDownload to downloadStart

nannanko marked 3 inline comments as done.