SagerNet / SagerNet

The universal proxy toolchain for Android

Home Page:https://sagernet.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

While running "URL Test", do a sort after testing each profile

pouriaksrvi opened this issue · comments

commented

Already, after "URL Test" gets executed for the list, the list can be sorted finally after all tests get completed (i.e. when all profiles have been tested)

When the profile list is too long, user can't wait for testing all profiles, so it is better to do a sort after testing each profile instead of doing only one sort after testing all profiles.

  1. After detecting a profile being unavailable, put it at the bottom. (Also better to compare its last ping value with the last ping value of the profiles which are at the bottom at the same moment, to have a local order at the bottom for unavailable profiles)
  2. After detecting a profile being available, put it at the top. (Also better to compare its ping value with the ping value of the profiles which are at the top at the same moment, to have a local order at the top for available profiles)
  3. Profiles which are still not tested will stay at the middle of the list until being detected as being available or unavailable to be moved to top or bottom according to 1 or 2 each one.

Also, please don't block the GUI while these test/sorts are running (Look at v2rayNG behavior for tests).
Already, when user runs a test, the GUI gets blocked by the popup temporary list overlay. Remove this overlay from the app. Instead of this, you can tell the user that the current list order and test results are invalid. After all test/sorts get completed, inform the user that the current list and its values are updated and valid.

This is helpful for users having a long list. When the tests are running, let the GUI get continuously updated according to test results and let user interact with it.