Skip to content

Instantly share code, notes, and snippets.

@joecks
Created August 21, 2017 16:20
Show Gist options
  • Save joecks/4d56afd36590b6b9155f5a5604f4745d to your computer and use it in GitHub Desktop.
Save joecks/4d56afd36590b6b9155f5a5604f4745d to your computer and use it in GitHub Desktop.
interface TasksActions {
fun onTaskDetails(taskId: String)
fun onNewTask()
}
class TasksViewModel(private val tasksRepository: TasksRepository,
// The injected callbacks for highlevel actions like onNewTask, onTaskDetails
private val tasksActions: TasksActions) : BaseReactViewModel<TasksViewData>(),
// The taks item Actions
TasksViewItemActions,
// The tasks view actions like the create new task FAB
TasksViewActions {
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment