From bf3d3b3ffa4b86475d46d16504b7ec1e5eaa607f Mon Sep 17 00:00:00 2001 From: jhg3410 <80373033+jhg3410@users.noreply.github.com> Date: Sun, 5 Mar 2023 15:53:50 +0900 Subject: [PATCH] =?UTF-8?q?refactor:=20#21=20-=20Adapter(Like,=20Search)?= =?UTF-8?q?=20=ED=8C=A8=ED=82=A4=EC=A7=80=20=EB=B0=8F=20=EB=84=A4=EC=9D=B4?= =?UTF-8?q?=EB=B0=8D=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/org/inu/events/ui/adapter/{like => }/LikeAdapter.kt | 2 +- .../{like/LikePagingAdapter.kt => SearchPagingAdapter.kt} | 4 ++-- app/src/main/java/org/inu/events/ui/binding/AdapterBinding.kt | 2 +- app/src/main/java/org/inu/events/ui/home/SearchActivity.kt | 4 ++-- .../main/java/org/inu/events/ui/mypage/store/LikeActivity.kt | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) rename app/src/main/java/org/inu/events/ui/adapter/{like => }/LikeAdapter.kt (98%) rename app/src/main/java/org/inu/events/ui/adapter/{like/LikePagingAdapter.kt => SearchPagingAdapter.kt} (91%) diff --git a/app/src/main/java/org/inu/events/ui/adapter/like/LikeAdapter.kt b/app/src/main/java/org/inu/events/ui/adapter/LikeAdapter.kt similarity index 98% rename from app/src/main/java/org/inu/events/ui/adapter/like/LikeAdapter.kt rename to app/src/main/java/org/inu/events/ui/adapter/LikeAdapter.kt index 74cc10d..0d77c2d 100644 --- a/app/src/main/java/org/inu/events/ui/adapter/like/LikeAdapter.kt +++ b/app/src/main/java/org/inu/events/ui/adapter/LikeAdapter.kt @@ -1,4 +1,4 @@ -package org.inu.events.ui.adapter.like +package org.inu.events.ui.adapter import android.view.LayoutInflater import android.view.ViewGroup diff --git a/app/src/main/java/org/inu/events/ui/adapter/like/LikePagingAdapter.kt b/app/src/main/java/org/inu/events/ui/adapter/SearchPagingAdapter.kt similarity index 91% rename from app/src/main/java/org/inu/events/ui/adapter/like/LikePagingAdapter.kt rename to app/src/main/java/org/inu/events/ui/adapter/SearchPagingAdapter.kt index 7a3f85e..38471d5 100644 --- a/app/src/main/java/org/inu/events/ui/adapter/like/LikePagingAdapter.kt +++ b/app/src/main/java/org/inu/events/ui/adapter/SearchPagingAdapter.kt @@ -1,4 +1,4 @@ -package org.inu.events.ui.adapter.like +package org.inu.events.ui.adapter import android.view.LayoutInflater import android.view.ViewGroup @@ -8,7 +8,7 @@ import androidx.recyclerview.widget.RecyclerView import org.inu.events.data.model.entity.Event import org.inu.events.databinding.ItemLikeEventBinding -class LikePagingAdapter : PagingDataAdapter(LikeDiffUtil) { +class SearchPagingAdapter : PagingDataAdapter(LikeDiffUtil) { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int) = ViewHolder.from(parent) diff --git a/app/src/main/java/org/inu/events/ui/binding/AdapterBinding.kt b/app/src/main/java/org/inu/events/ui/binding/AdapterBinding.kt index da2ffd9..7b1d541 100644 --- a/app/src/main/java/org/inu/events/ui/binding/AdapterBinding.kt +++ b/app/src/main/java/org/inu/events/ui/binding/AdapterBinding.kt @@ -5,7 +5,7 @@ import androidx.recyclerview.widget.RecyclerView import org.inu.events.data.model.entity.Event import org.inu.events.data.model.entity.User import org.inu.events.ui.adapter.* -import org.inu.events.ui.adapter.like.LikeAdapter +import org.inu.events.ui.adapter.LikeAdapter @BindingAdapter("app:likes") fun setLikes(recyclerView: RecyclerView, list: List?) { diff --git a/app/src/main/java/org/inu/events/ui/home/SearchActivity.kt b/app/src/main/java/org/inu/events/ui/home/SearchActivity.kt index 182fc26..699cb61 100644 --- a/app/src/main/java/org/inu/events/ui/home/SearchActivity.kt +++ b/app/src/main/java/org/inu/events/ui/home/SearchActivity.kt @@ -9,13 +9,13 @@ import androidx.lifecycle.repeatOnLifecycle import kotlinx.coroutines.flow.collectLatest import kotlinx.coroutines.launch import org.inu.events.databinding.ActivitySearchBinding -import org.inu.events.ui.adapter.like.LikePagingAdapter +import org.inu.events.ui.adapter.SearchPagingAdapter class SearchActivity : AppCompatActivity() { private val vm: SearchViewModel by viewModels() private lateinit var binding: ActivitySearchBinding - private val adapter = LikePagingAdapter() + private val adapter = SearchPagingAdapter() override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) diff --git a/app/src/main/java/org/inu/events/ui/mypage/store/LikeActivity.kt b/app/src/main/java/org/inu/events/ui/mypage/store/LikeActivity.kt index 0efa1de..28492e4 100644 --- a/app/src/main/java/org/inu/events/ui/mypage/store/LikeActivity.kt +++ b/app/src/main/java/org/inu/events/ui/mypage/store/LikeActivity.kt @@ -2,7 +2,7 @@ package org.inu.events.ui.mypage.store import androidx.activity.viewModels import org.inu.events.R -import org.inu.events.ui.adapter.like.LikeAdapter +import org.inu.events.ui.adapter.LikeAdapter import org.inu.events.base.BaseActivity import org.inu.events.databinding.ActivityLikeBinding