Long click favourite to select slot
This commit is contained in:
2 files changed
+26
-1
No files matched your search
@@ -62,12 +62,17 @@ public final class CommonOperations {
|
||||
|
||||
public static void addToFavorites(final Activity activity, final GalleryInfo galleryInfo,
|
||||
final EhClient.Callback<Void> listener) {
|
||||
addToFavorites(activity, galleryInfo, listener, false);
|
||||
}
|
||||
|
||||
public static void addToFavorites(final Activity activity, final GalleryInfo galleryInfo,
|
||||
final EhClient.Callback<Void> listener, boolean select) {
|
||||
int slot = Settings.getDefaultFavSlot();
|
||||
String[] items = new String[11];
|
||||
items[0] = activity.getString(R.string.local_favorites);
|
||||
String[] favCat = Settings.getFavCat();
|
||||
System.arraycopy(favCat, 0, items, 1, 10);
|
||||
if (slot >= -1 && slot <= 9) {
|
||||
if (!select && slot >= -1 && slot <= 9) {
|
||||
String newFavoriteName = slot >= 0 ? items[slot + 1] : null;
|
||||
doAddToFavorites(activity, galleryInfo, slot, new DelegateFavoriteCallback(listener, galleryInfo, newFavoriteName, slot));
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user