status-desktop/test/ui-test/testSuites/suite_communities
Jonathan Rainville 2aa759adcf refactor(section-model): change model to be sorted to fix reorder
Part of #3364

To make the drag and drop reorder work correctly on channels, we needed to change the model again so that it was sorted in the model itself.
That is because the drag and drop gives us the value of the position it is dropped to as a single list, so dragging the second item of the second category would mean from position 5 to position to position 4, but what the backend wants is moving the item 2 to position 1.
Sorting the model enables us to get the category that is the parent of that position and call the service with the right positions and id.
It also enables us to reorder the channel in and out of the category.
See the module code to see how the calculation is done with an explanatory comment.
The model needed some changes to support that. Some of the function where changed from dataChange calls to resetModel calls, since we need to re-sort the model.
I tried using beginMove, but it would crash. Maybe there is a bug in NimQML or I used it badly, I'm not sure.
2023-04-19 12:26:15 -04:00
..
shared refactor(section-model): change model to be sorted to fix reorder 2023-04-19 12:26:15 -04:00
tst_communityAdminFlows test(community): re-add test that replies to another message 2023-01-31 16:54:01 -05:00
tst_communityFlows refactor(section-model): change model to be sorted to fix reorder 2023-04-19 12:26:15 -04:00
tst_communityMemberFlows test(community): re-add test that replies to another message 2023-01-31 16:54:01 -05:00
tst_communityMessageFlows test(community): re-add mark as read test in community tests 2023-02-08 13:46:15 -05:00
tst_communityNavigation feat(tst_communityNavigation): Implemented community leave test 2023-01-26 19:27:13 +03:00
tst_communityPermissions test(tst_communityPermissions): permissions setting is available 2023-03-16 09:20:36 +01:00
tst_searchFlows chore(tests_: remove tests that use public chats 2023-01-25 10:05:55 -05:00
config.xml test(community): add test that invites a user to the community 2022-10-26 12:32:52 -04:00
suite.conf test(tst_communityPermissions): permissions setting is available 2023-03-16 09:20:36 +01:00