Skip to content

Commit

Permalink
[chore] #7 chore
Browse files Browse the repository at this point in the history
  • Loading branch information
Sangwook123 committed May 3, 2024
1 parent c6f900e commit 289d4d3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 82 deletions.
81 changes: 0 additions & 81 deletions feature/home/src/main/java/org/sopt/home/HomeFriendContainer.kt

This file was deleted.

8 changes: 7 additions & 1 deletion feature/home/src/main/java/org/sopt/home/HomeViewModel.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.sopt.home

import android.util.Log
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import androidx.paging.PagingData
Expand All @@ -8,6 +9,8 @@ import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.StateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.catch
import kotlinx.coroutines.flow.collectLatest
import kotlinx.coroutines.flow.distinctUntilChanged
import kotlinx.coroutines.launch
import org.sopt.domain.repo.UserRepository
Expand All @@ -32,7 +35,10 @@ class HomeViewModel @Inject constructor(
userRepository.getUser()
.distinctUntilChanged()
.cachedIn(viewModelScope)
.collect {
.catch { t ->
Log.e("error", t.message.toString())
}
.collectLatest {
_userState.emit(it)
}
}
Expand Down

0 comments on commit 289d4d3

Please sign in to comment.