Skip to content

Instantly share code, notes, and snippets.

View yveskalume's full-sized avatar
🌍
Working from Anywhere

Yves Kalume yveskalume

🌍
Working from Anywhere
View GitHub Profile
class PostViewModel(
initialState: PostState
) : MavericksViewModel<PostState>(initialState), KoinComponent {
private val repository: PostRepository by inject()
init {
getData()
}
private fun getData() {
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? {