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:
Alexander Bakker 2022-11-01 20:43:27 +01:00
parent c27d080a11
commit 7c0b22920d
8 changed files with 63 additions and 106 deletions

View file

@ -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);
}