This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PostViewModel( | |
initialState: PostState | |
) : MavericksViewModel<PostState>(initialState), KoinComponent { | |
private val repository: PostRepository by inject() | |
init { | |
getData() | |
} | |
private fun getData() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PostFragment : Fragment(), OnItemClickListener, MavericksView { | |
private val binding by lazy { FragmentPostBinding.inflate(layoutInflater) } | |
private val adapter by lazy { PostAdapter(this) } | |
private val postViewModel: PostViewModel by fragmentViewModel() | |
override fun onCreateView( | |
inflater: LayoutInflater, container: ViewGroup?, | |
savedInstanceState: Bundle? | |
): View? { |
NewerOlder