mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-04-23 23:39:14 +00:00
This patch introduces the new ``UUIDMap`` type, reducing code duplication and making UUID lookups faster. We currently already use UUIDs as the identifier for the ``DatabaseEntry`` and ``Slot`` types, but the way lookups by UUID work are kind of ugly, as we simply iterate over the list until we find a match. As we're probably going to have more types like this soon (groups and icons, for example), I figured it'd be good to abstract this away into a separate type and make it a map instead of a list. The only thing that has gotten slower is the ``swap`` method. The internal ``LinkedHashMap`` retains insertion order with a linked list, but does not know about the position of the values, so we basically have to copy the entire map to simply swap two values. I don't think it's too big of a deal, because swap operations still take less than a millisecond even with large vaults, but suggestions for improving this are welcome. I had to update gradle and JUnit to be able to use the new ``assertThrows`` assertion method, so this patch includes that as well. |
||
---|---|---|
.. | ||
glide | ||
models | ||
preferences | ||
slides | ||
tasks | ||
views | ||
AegisActivity.java | ||
AuthActivity.java | ||
Dialogs.java | ||
EditEntryActivity.java | ||
GroupManagerActivity.java | ||
IntroActivity.java | ||
MainActivity.java | ||
PreferencesActivity.java | ||
PreferencesFragment.java | ||
ScannerActivity.java | ||
SelectEntriesActivity.java | ||
SlotManagerActivity.java |