mirror of
https://github.com/beemdevelopment/Aegis.git
synced 2025-05-14 22:12:55 +00:00
Fix minor entry margin issues
Accidentally introduced with the entry pinning feature This also moves the favorite field to the vault instead of shared preference in order to avoid some complexity
This commit is contained in:
parent
c27d080a11
commit
7c0b22920d
8 changed files with 63 additions and 106 deletions
|
@ -235,27 +235,6 @@ public class Preferences {
|
|||
_prefs.edit().putString("pref_usage_count", usageCountJson.toString()).apply();
|
||||
}
|
||||
|
||||
public List<UUID> getFavorites() {
|
||||
List<UUID> favorites = new ArrayList<>();
|
||||
Set<String> favoritesStringSet = _prefs.getStringSet("pref_favorites", null);
|
||||
if(favoritesStringSet != null) {
|
||||
for (String favorite : favoritesStringSet) {
|
||||
favorites.add(UUID.fromString(favorite));
|
||||
}
|
||||
}
|
||||
|
||||
return favorites;
|
||||
}
|
||||
|
||||
public void setFavorites(List<UUID> favorites) {
|
||||
Set<String> favoritesHashSet = new HashSet<String>();
|
||||
for (UUID favorite : favorites) {
|
||||
favoritesHashSet.add(favorite.toString());
|
||||
}
|
||||
|
||||
_prefs.edit().putStringSet("pref_favorites", favoritesHashSet).apply();
|
||||
}
|
||||
|
||||
public int getTimeout() {
|
||||
return _prefs.getInt("pref_timeout", -1);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue