diff --git a/app/src/main/java/com/hippo/app/ListCheckBoxDialogBuilder.java b/app/src/main/java/com/hippo/app/ListCheckBoxDialogBuilder.java new file mode 100644 index 000000000..47ba6502c --- /dev/null +++ b/app/src/main/java/com/hippo/app/ListCheckBoxDialogBuilder.java @@ -0,0 +1,73 @@ +/* + * Copyright 2016 Hippo Seven + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hippo.app; + +import android.annotation.SuppressLint; +import android.content.Context; +import android.support.v7.app.AlertDialog; +import android.view.LayoutInflater; +import android.view.View; +import android.widget.AdapterView; +import android.widget.ArrayAdapter; +import android.widget.CheckBox; +import android.widget.ListView; + +import com.hippo.ehviewer.R; +import com.hippo.yorozuya.ViewUtils; + +public class ListCheckBoxDialogBuilder extends AlertDialog.Builder { + + private final CheckBox mCheckBox; + + private AlertDialog mDialog; + + @SuppressLint("InflateParams") + public ListCheckBoxDialogBuilder(Context context, CharSequence[] items, + final OnItemClickListener listener, String checkText, boolean checked) { + super(context); + View view = LayoutInflater.from(context).inflate(R.layout.dialog_list_checkbox_builder, null); + setView(view); + ListView listView = (ListView) ViewUtils.$$(view, R.id.list_view); + mCheckBox = (CheckBox) ViewUtils.$$(view, R.id.checkbox); + listView.setAdapter(new ArrayAdapter<>(context, R.layout.item_simple_list, items)); + listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { + @Override + public void onItemClick(AdapterView parent, View view, int position, long id) { + if (listener != null) { + listener.onItemClick(ListCheckBoxDialogBuilder.this, mDialog, position); + } + mDialog.dismiss(); + } + }); + mCheckBox.setText(checkText); + mCheckBox.setChecked(checked); + } + + public boolean isChecked() { + return mCheckBox.isChecked(); + } + + @Override + public AlertDialog create() { + mDialog = super.create(); + return mDialog; + } + + public interface OnItemClickListener { + void onItemClick(ListCheckBoxDialogBuilder builder, AlertDialog dialog, int position); + } +} diff --git a/app/src/main/java/com/hippo/ehviewer/EhDB.java b/app/src/main/java/com/hippo/ehviewer/EhDB.java index 5e04b3c15..ba5272e8c 100644 --- a/app/src/main/java/com/hippo/ehviewer/EhDB.java +++ b/app/src/main/java/com/hippo/ehviewer/EhDB.java @@ -482,6 +482,10 @@ public class EhDB { return result; } + public static synchronized void removeLocalFavorites(int gid) { + sDaoSession.getLocalFavoritesDao().deleteByKey((long) gid); + } + public static synchronized void removeLocalFavorites(int[] gidArray) { LocalFavoritesDao dao = sDaoSession.getLocalFavoritesDao(); for (int gid: gidArray) { @@ -489,6 +493,25 @@ public class EhDB { } } + public static synchronized boolean containLocalFavorites(int gid) { + LocalFavoritesDao dao = sDaoSession.getLocalFavoritesDao(); + return null != dao.load((long) gid); + } + + public static synchronized void addLocalFavorites(GalleryInfo galleryInfo) { + LocalFavoritesDao dao = sDaoSession.getLocalFavoritesDao(); + if (null != dao.load((long) galleryInfo.gid)) { + // Contained + return; + } + + addGalleryInfo(galleryInfo); + LocalFavoritesRaw raw = new LocalFavoritesRaw(); + raw.setGid((long) galleryInfo.gid); + raw.setDate(System.currentTimeMillis()); + dao.insert(raw); + } + public static synchronized void addLocalFavorites(List galleryInfoList) { LocalFavoritesDao dao = sDaoSession.getLocalFavoritesDao(); for (GalleryInfo gi: galleryInfoList) { diff --git a/app/src/main/java/com/hippo/ehviewer/Settings.java b/app/src/main/java/com/hippo/ehviewer/Settings.java index 213ca2da7..da0501139 100644 --- a/app/src/main/java/com/hippo/ehviewer/Settings.java +++ b/app/src/main/java/com/hippo/ehviewer/Settings.java @@ -338,4 +338,17 @@ public class Settings { public static void putRecentFavCat(int value) { putInt(KEY_RECENT_FAV_CAT, value); } + + // -1 for local, 0 - 9 for cloud favorite, other for no default fav slot + private static final String KEY_DEFAULT_FAV_SLOT = "default_favorite"; + public static final int INVALID_DEFAULT_FAV_SLOT = -2; + private static final int DEFAULT_DEFAULT_FAV_SLOT = INVALID_DEFAULT_FAV_SLOT; + + public static int getDefaultFavSlot() { + return getInt(KEY_DEFAULT_FAV_SLOT, DEFAULT_DEFAULT_FAV_SLOT); + } + + public static void putDefaultFavSlot(int value) { + putInt(KEY_DEFAULT_FAV_SLOT, value); + } } diff --git a/app/src/main/java/com/hippo/ehviewer/ui/CommonOperations.java b/app/src/main/java/com/hippo/ehviewer/ui/CommonOperations.java new file mode 100644 index 000000000..a5c82746e --- /dev/null +++ b/app/src/main/java/com/hippo/ehviewer/ui/CommonOperations.java @@ -0,0 +1,87 @@ +/* + * Copyright 2016 Hippo Seven + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hippo.ehviewer.ui; + +import android.app.Activity; +import android.support.v7.app.AlertDialog; + +import com.hippo.app.ListCheckBoxDialogBuilder; +import com.hippo.ehviewer.EhApplication; +import com.hippo.ehviewer.EhDB; +import com.hippo.ehviewer.R; +import com.hippo.ehviewer.Settings; +import com.hippo.ehviewer.client.EhClient; +import com.hippo.ehviewer.client.EhRequest; +import com.hippo.ehviewer.client.data.GalleryInfo; + +public final class CommonOperations { + + private static void doAddToFavorites(Activity activity, GalleryInfo galleryInfo, + int slot, EhClient.Callback listener) { + if (slot == -1) { + EhDB.addLocalFavorites(galleryInfo); + listener.onSuccess(null); + } else if (slot >= 0 && slot <= 9) { + EhClient client = EhApplication.getEhClient(activity); + EhRequest request = new EhRequest(); + request.setMethod(EhClient.METHOD_ADD_FAVORITES); + request.setArgs(galleryInfo.gid, galleryInfo.token, slot, ""); + request.setCallback(listener); + client.execute(request); + } else { + listener.onFailure(new Exception()); // TODO Add text + } + } + + public static void addToFavorites(final Activity activity, final GalleryInfo galleryInfo, + final EhClient.Callback listener) { + int slot = Settings.getDefaultFavSlot(); + if (slot >= -1 && slot <= 9) { + doAddToFavorites(activity, galleryInfo, slot, listener); + } else { + String[] items = new String[11]; + items[0] = activity.getString(R.string.local_favorites); + String[] favCat = Settings.getFavCat(); + System.arraycopy(favCat, 0, items, 1, 10); + new ListCheckBoxDialogBuilder(activity, items, + new ListCheckBoxDialogBuilder.OnItemClickListener() { + @Override + public void onItemClick(ListCheckBoxDialogBuilder builder, AlertDialog dialog, int position) { + int slot = position - 1; + doAddToFavorites(activity, galleryInfo, slot, listener); + if (!builder.isChecked()) { + Settings.putDefaultFavSlot(Settings.INVALID_DEFAULT_FAV_SLOT); + } else { + Settings.putDefaultFavSlot(slot); + } + } + }, activity.getString(R.string.remember_favorite_slot), false) + .setTitle(R.string.add_favorites_dialog_title) + .show(); + } + } + + public static void removeFromFavorites(Activity activity, GalleryInfo galleryInfo, + final EhClient.Callback listener) { + EhClient client = EhApplication.getEhClient(activity); + EhRequest request = new EhRequest(); + request.setMethod(EhClient.METHOD_ADD_FAVORITES); + request.setArgs(galleryInfo.gid, galleryInfo.token, -1, ""); + request.setCallback(listener); + client.execute(request); + } +} diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.java index acba7a67b..9fd6b169a 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryDetailScene.java @@ -56,6 +56,7 @@ import android.widget.Toast; import com.hippo.drawable.RoundSideRectDrawable; import com.hippo.ehviewer.EhApplication; +import com.hippo.ehviewer.EhDB; import com.hippo.ehviewer.R; import com.hippo.ehviewer.UrlOpener; import com.hippo.ehviewer.client.EhCacheKeyFactory; @@ -71,6 +72,7 @@ import com.hippo.ehviewer.client.data.LargePreviewSet; import com.hippo.ehviewer.client.data.ListUrlBuilder; import com.hippo.ehviewer.client.parser.RateGalleryParser; import com.hippo.ehviewer.download.DownloadService; +import com.hippo.ehviewer.ui.CommonOperations; import com.hippo.ehviewer.ui.GalleryActivity; import com.hippo.ehviewer.ui.annotation.ViewLifeCircle; import com.hippo.rippleold.RippleSalon; @@ -265,6 +267,8 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene @State private int mState = STATE_INIT; + private boolean mModifingFavorites; + private void handleArgs(Bundle args) { if (args == null) { return; @@ -703,6 +707,24 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene } } + private void updateFavoriteDrawable() { + GalleryDetail gd = mGalleryDetail; + if (gd == null) { + return; + } + if (mHeart == null || mHeartOutline == null ) { + return; + } + + if (gd.isFavored || EhDB.containLocalFavorites(gd.gid)) { + mHeart.setVisibility(View.VISIBLE); + mHeartOutline.setVisibility(View.GONE); + } else { + mHeart.setVisibility(View.GONE); + mHeartOutline.setVisibility(View.VISIBLE); + } + } + private void bindViewSecond() { GalleryDetail gd = mGalleryDetail; if (gd == null) { @@ -710,8 +732,7 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene } if (mThumb == null || mTitle == null || mUploader == null || mCategory == null || mLanguage == null || mPages == null || mSize == null || mPosted == null || - mFavoredTimes == null || mRatingText == null || mRating == null || - mHeart == null || mHeartOutline == null || mTorrent == null) { + mFavoredTimes == null || mRatingText == null || mRating == null || mTorrent == null) { return; } @@ -733,13 +754,8 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene mRatingText.setText(getAllRatingText(gd.rating, gd.ratedTimes)); mRating.setRating(gd.rating); - if (gd.isFavored) { - mHeart.setVisibility(View.VISIBLE); - mHeartOutline.setVisibility(View.GONE); - } else { - mHeart.setVisibility(View.GONE); - mHeartOutline.setVisibility(View.VISIBLE); - } + updateFavoriteDrawable(); + mTorrent.setText(resources.getString(R.string.torrent_count, gd.torrentCount)); bindTags(gd.tags); @@ -998,6 +1014,29 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene Bundle args = new Bundle(); args.putParcelable(GalleryInfoScene.KEY_GALLERY_DETAIL, mGalleryDetail); startScene(new Announcer(GalleryInfoScene.class).setArgs(args)); + } else if (mHeartGroup == v) { + if (mGalleryDetail != null && !mModifingFavorites) { + boolean remove = false; + if (EhDB.containLocalFavorites(mGalleryDetail.gid)) { + EhDB.removeLocalFavorites(mGalleryDetail.gid); + remove = true; + } + if (mGalleryDetail.isFavored) { + mModifingFavorites = true; + CommonOperations.removeFromFavorites(getActivity(), mGalleryDetail, + new ModifyFavoritesListener(getContext(), + ((StageActivity) getActivity()).getStageId(), getTag(), true)); + remove = true; + } + if (!remove) { + mModifingFavorites = true; + CommonOperations.addToFavorites(getActivity(), mGalleryDetail, + new ModifyFavoritesListener(getContext(), + ((StageActivity) getActivity()).getStageId(), getTag(), false)); + } + // Update UI + updateFavoriteDrawable(); + } } else if (mShare == v) { String url = getGalleryDetailUrl(false); if (url != null) { @@ -1172,6 +1211,51 @@ public class GalleryDetailScene extends BaseScene implements View.OnClickListene } } + private void onModifyFavoritesSuccess(boolean addOrRemove) { + mModifingFavorites = false; + if (mGalleryDetail != null) { + mGalleryDetail.isFavored = !addOrRemove; + updateFavoriteDrawable(); + } + } + + private class ModifyFavoritesListener extends EhCallback { + + private final boolean mAddOrRemove; + + /** + * @param addOrRemove false for add, true for remove + */ + public ModifyFavoritesListener(Context context, int stageId, String sceneTag, boolean addOrRemove) { + super(context, stageId, sceneTag); + mAddOrRemove = addOrRemove; + } + + @Override + public void onSuccess(Void result) { + Toast.makeText(getContext(), mAddOrRemove ? R.string.remove_from_favorite_success : + R.string.add_to_favorite_success, Toast.LENGTH_SHORT).show(); + GalleryDetailScene scene = getScene(); + if (scene != null) { + scene.onModifyFavoritesSuccess(mAddOrRemove); + } + } + + @Override + public void onFailure(Exception e) { + Toast.makeText(getContext(), mAddOrRemove ? R.string.remove_from_favorite_failure : + R.string.add_to_favorite_failure, Toast.LENGTH_SHORT).show(); + } + + @Override + public void onCancel() {} + + @Override + public boolean isInstance(SceneFragment scene) { + return scene instanceof GalleryDetailScene; + } + } + private class TorrentListDialogHelper implements AdapterView.OnItemClickListener, DialogInterface.OnDismissListener, EhClient.Callback[]> { diff --git a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryInfoScene.java b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryInfoScene.java index a27549e6a..2b7493c78 100644 --- a/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryInfoScene.java +++ b/app/src/main/java/com/hippo/ehviewer/ui/scene/GalleryInfoScene.java @@ -110,9 +110,9 @@ public final class GalleryInfoScene extends ToolbarScene implements EasyRecycler mValues.add(gd.size); mKeys.add(resources.getString(R.string.key_resize)); mValues.add(gd.resize); - mKeys.add(resources.getString(R.string.key_favourites)); + mKeys.add(resources.getString(R.string.key_favorites)); mValues.add(Integer.toString(gd.favoredTimes)); - mKeys.add(resources.getString(R.string.key_favourited)); + mKeys.add(resources.getString(R.string.key_favorited)); mValues.add(Boolean.toString(gd.isFavored)); mKeys.add(resources.getString(R.string.key_rates)); mValues.add(Integer.toString(gd.ratedTimes)); diff --git a/app/src/main/java/com/hippo/widget/IndicatingListView.java b/app/src/main/java/com/hippo/widget/IndicatingListView.java new file mode 100644 index 000000000..70ddff806 --- /dev/null +++ b/app/src/main/java/com/hippo/widget/IndicatingListView.java @@ -0,0 +1,97 @@ +/* + * Copyright 2016 Hippo Seven + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.hippo.widget; + +import android.content.Context; +import android.content.res.TypedArray; +import android.graphics.Canvas; +import android.graphics.Color; +import android.graphics.Paint; +import android.graphics.Rect; +import android.support.annotation.NonNull; +import android.util.AttributeSet; +import android.widget.ListView; + +import com.hippo.ehviewer.R; + +public class IndicatingListView extends ListView { + + private int mIndicatorHeight; + + private final Paint mPaint = new Paint(); + private final Rect mTemp = new Rect(); + + public IndicatingListView(Context context) { + super(context); + init(context, null); + } + + public IndicatingListView(Context context, AttributeSet attrs) { + super(context, attrs); + init(context, attrs); + } + + public IndicatingListView(Context context, AttributeSet attrs, int defStyleAttr) { + super(context, attrs, defStyleAttr); + init(context, attrs); + } + + private void init(Context context, AttributeSet attrs) { + TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.Indicating); + mIndicatorHeight = a.getDimensionPixelOffset(R.styleable.Indicating_indicatorHeight, 1); + mPaint.setColor(a.getColor(R.styleable.Indicating_indicatorColor, Color.BLACK)); + mPaint.setStyle(Paint.Style.FILL); + a.recycle(); + } + + private void fillTopIndicatorDrawRect() { + mTemp.set(0, 0, getWidth(), mIndicatorHeight); + } + + private void fillBottomIndicatorDrawRect() { + mTemp.set(0, getHeight() - mIndicatorHeight, getWidth(), getHeight()); + } + + private boolean needShowTopIndicator() { + return canScrollVertically(-1); + } + + private boolean needShowBottomIndicator() { + return canScrollVertically(1); + } + + @Override + public void draw(@NonNull Canvas canvas) { + super.draw(canvas); + + final int restoreCount = canvas.save(); + canvas.translate(getScrollX(), getScrollY()); + + // Draw top indicator + if (needShowTopIndicator()) { + fillTopIndicatorDrawRect(); + canvas.drawRect(mTemp, mPaint); + } + // Draw bottom indicator + if (needShowBottomIndicator()) { + fillBottomIndicatorDrawRect(); + canvas.drawRect(mTemp, mPaint); + } + + canvas.restoreToCount(restoreCount); + } +} diff --git a/app/src/main/java/com/hippo/widget/IndicatingScrollView.java b/app/src/main/java/com/hippo/widget/IndicatingScrollView.java index e02a89871..a2dcabcc5 100644 --- a/app/src/main/java/com/hippo/widget/IndicatingScrollView.java +++ b/app/src/main/java/com/hippo/widget/IndicatingScrollView.java @@ -35,6 +35,11 @@ public class IndicatingScrollView extends ScrollView { private final Paint mPaint = new Paint(); private final Rect mTemp = new Rect(); + public IndicatingScrollView(Context context) { + super(context); + init(context, null); + } + public IndicatingScrollView(Context context, AttributeSet attrs) { super(context, attrs); init(context, attrs); @@ -46,9 +51,9 @@ public class IndicatingScrollView extends ScrollView { } private void init(Context context, AttributeSet attrs) { - TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.IndicatingScrollView); - mIndicatorHeight = a.getDimensionPixelOffset(R.styleable.IndicatingScrollView_indicatorHeight, 1); - mPaint.setColor(a.getColor(R.styleable.IndicatingScrollView_indicatorColor, Color.BLACK)); + TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.Indicating); + mIndicatorHeight = a.getDimensionPixelOffset(R.styleable.Indicating_indicatorHeight, 1); + mPaint.setColor(a.getColor(R.styleable.Indicating_indicatorColor, Color.BLACK)); mPaint.setStyle(Paint.Style.FILL); a.recycle(); } diff --git a/app/src/main/res/layout/dialog_checkbox_builder.xml b/app/src/main/res/layout/dialog_checkbox_builder.xml index 5ec34c421..99d755aff 100644 --- a/app/src/main/res/layout/dialog_checkbox_builder.xml +++ b/app/src/main/res/layout/dialog_checkbox_builder.xml @@ -22,7 +22,7 @@ android:orientation="vertical"> diff --git a/app/src/main/res/layout/dialog_gallery_menu.xml b/app/src/main/res/layout/dialog_gallery_menu.xml index 8c8e17e79..05e01281e 100644 --- a/app/src/main/res/layout/dialog_gallery_menu.xml +++ b/app/src/main/res/layout/dialog_gallery_menu.xml @@ -17,7 +17,7 @@ diff --git a/app/src/main/res/layout/dialog_list_checkbox_builder.xml b/app/src/main/res/layout/dialog_list_checkbox_builder.xml new file mode 100644 index 000000000..a8772e3b0 --- /dev/null +++ b/app/src/main/res/layout/dialog_list_checkbox_builder.xml @@ -0,0 +1,48 @@ + + + + + + + + + + diff --git a/app/src/main/res/layout/gallery_detail_actions.xml b/app/src/main/res/layout/gallery_detail_actions.xml index e9479a0c5..7c79a66e5 100644 --- a/app/src/main/res/layout/gallery_detail_actions.xml +++ b/app/src/main/res/layout/gallery_detail_actions.xml @@ -48,7 +48,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" - android:text="@string/favorites" + android:text="@string/favorited" android:drawablePadding="8dp" android:textColor="@color/primary_text_light"/> @@ -57,7 +57,7 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="center_horizontal" - android:text="@string/favorites" + android:text="@string/unfavorited" android:drawablePadding="8dp" android:textColor="@color/primary_text_light"/> diff --git a/app/src/main/res/values-zh-rCN/strings.xml b/app/src/main/res/values-zh-rCN/strings.xml index 00fea6525..7b77f75e4 100644 --- a/app/src/main/res/values-zh-rCN/strings.xml +++ b/app/src/main/res/values-zh-rCN/strings.xml @@ -157,8 +157,8 @@ 页数 大小 压缩情况 - 收藏次数 - 收藏 + 收藏次数 + 收藏 评价次数 评分 种子个数 diff --git a/app/src/main/res/values-zh-rHK/strings.xml b/app/src/main/res/values-zh-rHK/strings.xml index 5987523cd..63c42e2fe 100644 --- a/app/src/main/res/values-zh-rHK/strings.xml +++ b/app/src/main/res/values-zh-rHK/strings.xml @@ -157,8 +157,8 @@ 頁數 大小 壓縮情況 - 收藏次數 - 收藏 + 收藏次數 + 收藏 評價次數 評分 種子個數 diff --git a/app/src/main/res/values-zh-rTW/strings.xml b/app/src/main/res/values-zh-rTW/strings.xml index 5031de901..3d06592c2 100644 --- a/app/src/main/res/values-zh-rTW/strings.xml +++ b/app/src/main/res/values-zh-rTW/strings.xml @@ -157,8 +157,8 @@ 頁數 大小 壓縮情況 - 收藏次數 - 收藏 + 收藏次數 + 收藏 評價次數 評分 種子個數 diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 8f8756db2..dbdfb8ae9 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -113,7 +113,7 @@ - + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3801784c0..87b759004 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -165,6 +165,14 @@ Rate failed No torrents Torrents + Favorited + Unfavorited + Add to favorites + Remember favorite slot + Added to favorites + Removed from favorites + Failed to add to favorites + Failed to remove from favorites MASTERPIECE @@ -199,8 +207,8 @@ Pages Size Resize - Favourites - Favourited + Favorites + Favorited Rates Rating Torrents @@ -313,7 +321,7 @@ Search %s %s %1$s - %2$s - Delete favorites + Delete from favorites Delete %d items from favorites Move favorites diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index 57c03cc0b..2c54abc35 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -120,12 +120,12 @@ true - -