Created
July 29, 2019 10:43
-
-
Save mig15/ed57e2856bd9539e6f73c84bc354f909 to your computer and use it in GitHub Desktop.
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
override fun sendResume() { | |
scope.launch { | |
loading { | |
runCatching { | |
val addInfo = CreateResumePostRequest.Topic.AddInfo(email = questionParam.email, | |
phone = questionParam.phone) | |
val view = CreateResumePostRequest.Topic.JsonView.View(professionality = questionParam.professionalArea, | |
salary = questionParam.money, | |
skills = questionParam.skills, | |
text = questionParam.aboutMe, | |
vacancyName = questionParam.position, | |
currency = questionParam.currency) | |
val jsonView = CreateResumePostRequest.Topic.JsonView(view = view) | |
val topic = CreateResumePostRequest.Topic(addInfo = addInfo, | |
jsonView = jsonView, | |
region = questionParam.regions) | |
val fileList = arrayListOf<CreateResumePostRequest.File>() | |
for (item in questionParam.adapterFileList) { | |
item as CreateAnimalHusbandryQuestionVM.AdapterFileItem | |
fileList.add(CreateResumePostRequest.File(fileId = item.id, | |
caption = item.path, | |
fileCaption = item.path)) | |
} | |
val body = CreateResumePostRequest(visibility = questionParam.visible.id, | |
text = questionParam.position, | |
topic = topic, | |
files = fileList) | |
facade.sendResume(body) | |
}.exceptionOrNull()?.showAlertDialog(activityController) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment