FrozenAssassine / EasePass

A powerful but simple, password manager that stores all your passwords locally and offline. Written in C# WinUI3
https://easepass.frozenassassine.de
MIT License
14 stars 0 forks source link

Sort password list #2

Closed FrozenAssassine closed 1 year ago

FrozenAssassine commented 1 year ago

Add a feature to sort the password list

finn-freitag commented 1 year ago

Sorting in alphabetical order is ready, but reordering the items in the listbox by the user doesn't work.

FrozenAssassine commented 1 year ago

Try the following properties on the listview in XAML:

CanDragItems="True" CanReorderItems="True" AllowDrop="True" SelectionMode="Single"

finn-freitag commented 1 year ago

I have tried this before and it worked but it didn't update the order in the ObservableCollection<PasswordManagerItem> (even when I set Mode=TwoWay). I don't know/found a way how to get the order otherwise.

FrozenAssassine commented 1 year ago

Oh your are correct. I will take a look at it later.

FrozenAssassine commented 1 year ago

It actually does update the Observable collection. I now call SaveData in the DragItemsCompleted event and then the sorted collection gets saved to the database.

finn-freitag commented 1 year ago

Ok I had tried exactly the same, and it had not worked. "It doesn't work on my machine!" ;-)

FrozenAssassine commented 1 year ago

Check the new commit and try it out.