Let's call editing profile index x and deleted profile index y
Currently we does not handle:
x < y: The default profile and editing profile will be reset to the first profile, however when reload the page, it still has the value before reset. Additionally, the radio button does not represent the default profile correctly. Calling _setProfileIndex with the same x value will resolve this.
x > y: The editing profile index is not shifted up, therefore it moves into below profile. When the editing profile is the last index, it will cause index error, and we cannot add more profiles after that. The issue happens because when we add a profile, the editing profile index is set to last index.
List indexes are also updated correctly after deletion.
Fixes #1556
Let's call editing profile index
x
and deleted profile indexy
Currently we does not handle:
x < y
: The default profile and editing profile will be reset to the first profile, however when reload the page, it still has the value before reset. Additionally, the radio button does not represent the default profile correctly. Calling_setProfileIndex
with the samex
value will resolve this.x > y
: The editing profile index is not shifted up, therefore it moves into below profile. When the editing profile is the last index, it will cause index error, and we cannot add more profiles after that. The issue happens because when we add a profile, the editing profile index is set to last index.List indexes are also updated correctly after deletion.