From 4f61adfd2290fcfc728fc7a4b5ca7f2c2b3f3155 Mon Sep 17 00:00:00 2001 From: re4rk <37167652+re4rk@users.noreply.github.com> Date: Sat, 13 Apr 2024 22:02:01 +0900 Subject: [PATCH] =?UTF-8?q?fix(bookmark):=20ktlint=20=EC=A0=81=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/home/bookmarklist/BookmarkListFragment.kt | 4 ---- .../bookmarklist/artistbookmark/ArtistBookmarkAdapter.kt | 6 ------ .../artistbookmark/ArtistBookmarkListUiState.kt | 3 +-- .../bookmarklist/artistbookmark/ArtistBookmarkViewModel.kt | 3 ++- .../bookmarklist/schoolbookmark/SchoolBookmarkViewModel.kt | 1 - 5 files changed, 3 insertions(+), 14 deletions(-) diff --git a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/BookmarkListFragment.kt b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/BookmarkListFragment.kt index 9fa7e761f..f835f3e40 100644 --- a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/BookmarkListFragment.kt +++ b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/BookmarkListFragment.kt @@ -6,10 +6,8 @@ import android.view.View import android.view.ViewGroup import androidx.core.view.WindowInsetsCompat import androidx.fragment.app.Fragment -import androidx.fragment.app.viewModels import androidx.viewpager2.widget.ViewPager2 import com.festago.festago.presentation.databinding.FragmentBookmarkListBinding -import com.festago.festago.presentation.ui.home.bookmarklist.artistbookmark.ArtistBookmarkViewModel import com.festago.festago.presentation.util.setOnApplyWindowInsetsCompatListener import com.google.android.material.tabs.TabLayout import dagger.hilt.android.AndroidEntryPoint @@ -19,8 +17,6 @@ class BookmarkListFragment : Fragment() { private var _binding: FragmentBookmarkListBinding? = null private val binding get() = _binding!! - private val vm: ArtistBookmarkViewModel by viewModels() - override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, diff --git a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/artistbookmark/ArtistBookmarkAdapter.kt b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/artistbookmark/ArtistBookmarkAdapter.kt index 841d93c82..ff005a0c2 100644 --- a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/artistbookmark/ArtistBookmarkAdapter.kt +++ b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/artistbookmark/ArtistBookmarkAdapter.kt @@ -1,14 +1,8 @@ package com.festago.festago.presentation.ui.home.bookmarklist.artistbookmark -import android.view.LayoutInflater import android.view.ViewGroup -import android.widget.ListView -import android.widget.TextView import androidx.recyclerview.widget.DiffUtil import androidx.recyclerview.widget.ListAdapter -import androidx.recyclerview.widget.RecyclerView -import com.festago.festago.presentation.databinding.ItemArtistBookmarkBinding -import com.festago.festago.presentation.ui.home.bookmarklist.festivalbookmark.uistate.FestivalBookmarkItemUiState class ArtistBookmarkAdapter : ListAdapter(diffUtil) { override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ArtistBookmarkViewHolder { diff --git a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/artistbookmark/ArtistBookmarkListUiState.kt b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/artistbookmark/ArtistBookmarkListUiState.kt index a53ffae42..9b1d45711 100644 --- a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/artistbookmark/ArtistBookmarkListUiState.kt +++ b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/artistbookmark/ArtistBookmarkListUiState.kt @@ -1,9 +1,8 @@ package com.festago.festago.presentation.ui.home.bookmarklist.artistbookmark -import com.festago.festago.domain.model.bookmark.ArtistBookmark - interface ArtistBookmarkListUiState { object NotLoggedIn : ArtistBookmarkListUiState + object Loading : ArtistBookmarkListUiState data class Success(val artistBookmarks: List) : ArtistBookmarkListUiState diff --git a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/artistbookmark/ArtistBookmarkViewModel.kt b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/artistbookmark/ArtistBookmarkViewModel.kt index 47be1a0e7..5340c1acd 100644 --- a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/artistbookmark/ArtistBookmarkViewModel.kt +++ b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/artistbookmark/ArtistBookmarkViewModel.kt @@ -24,7 +24,8 @@ class ArtistBookmarkViewModel @Inject constructor( _uiState.value = ArtistBookmarkListUiState.Loading bookmarkRepository.getArtistBookmarks().onSuccess { artistBookmarks -> _uiState.value = ArtistBookmarkListUiState.Success( - artistBookmarks.map { it.toUiState() }) + artistBookmarks.map { it.toUiState() }, + ) }.onFailure { _uiState.value = ArtistBookmarkListUiState.Error } diff --git a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/schoolbookmark/SchoolBookmarkViewModel.kt b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/schoolbookmark/SchoolBookmarkViewModel.kt index fcd8eeb19..3c3acdce5 100644 --- a/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/schoolbookmark/SchoolBookmarkViewModel.kt +++ b/android/festago/presentation/src/main/java/com/festago/festago/presentation/ui/home/bookmarklist/schoolbookmark/SchoolBookmarkViewModel.kt @@ -4,7 +4,6 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.festago.festago.domain.model.bookmark.SchoolBookmark import com.festago.festago.domain.repository.BookmarkRepository -import com.festago.festago.presentation.ui.home.bookmarklist.festivalbookmark.FestivalBookmarkEvent import dagger.hilt.android.lifecycle.HiltViewModel import kotlinx.coroutines.flow.MutableSharedFlow import kotlinx.coroutines.flow.MutableStateFlow