Remove unused TransitionNameFactory

This commit is contained in:
tarsin committed 2023-01-12 09:38:14 +08:00
1 parent 8db1c3400e
commit aa7d9cf29c
3 files changed
-47

No files matched your search

@@ -34,7 +34,6 @@ import androidx.appcompat.app.AlertDialog
import androidx.appcompat.widget.Toolbar
import androidx.core.content.ContextCompat
import androidx.core.view.GravityCompat
import androidx.core.view.ViewCompat
import androidx.drawerlayout.widget.DrawerLayout
import androidx.lifecycle.lifecycleScope
import androidx.recyclerview.widget.ItemTouchHelper
@@ -1032,12 +1031,6 @@ class DownloadsScene : BaseToolbarScene(), DownloadInfoListener, OnClickFabListe
category.setBackgroundColor(EhUtils.getCategoryColor(info.category))
}
bindForState(holder, info)
// Update transition name
ViewCompat.setTransitionName(
holder.thumb,
TransitionNameFactory.getThumbTransitionName(info.gid)
)
}
override fun getItemCount(): Int {
@@ -28,7 +28,6 @@ import android.widget.TextView;
import androidx.annotation.IntDef;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.core.view.ViewCompat;
import androidx.recyclerview.widget.RecyclerView;
import androidx.recyclerview.widget.StaggeredGridLayoutManager;
@@ -233,9 +232,6 @@ abstract class GalleryAdapter extends RecyclerView.Adapter<GalleryHolder> {
holder.simpleLanguage.setText(gi.getSimpleLanguage());
}
}
// Update transition name
ViewCompat.setTransitionName(holder.thumb, TransitionNameFactory.getThumbTransitionName(gi.getGid()));
}
@IntDef({TYPE_LIST, TYPE_GRID})
@@ -1,36 +0,0 @@
/*
* 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.scene;
public final class TransitionNameFactory {
public static String getThumbTransitionName(long gid) {
return "thumb:" + gid;
}
public static String getTitleTransitionName(long gid) {
return "title:" + gid;
}
public static String getUploaderTransitionName(long gid) {
return "uploader:" + gid;
}
public static String getCategoryTransitionName(long gid) {
return "category:" + gid;
}
}