Skip to content

Commit

Permalink
fix(bookmark): ktlint ์ ์šฉ
Browse files Browse the repository at this point in the history
  • Loading branch information
re4rk committed Apr 13, 2024
1 parent 8af6e56 commit 4f61adf
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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?,
Expand Down
Original file line number Diff line number Diff line change
@@ -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<ArtistBookmarkUiState, ArtistBookmarkViewHolder>(diffUtil) {
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ArtistBookmarkViewHolder {
Expand Down
Original file line number Diff line number Diff line change
@@ -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<ArtistBookmarkUiState>) : ArtistBookmarkListUiState
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 4f61adf

Please sign in to comment.