Skip to content

Commit

Permalink
refactor: 개행 및 콤마 추가, 불필요한 import문 삭제
Browse files Browse the repository at this point in the history
  • Loading branch information
iiolo committed Apr 19, 2024
1 parent af3b759 commit 461755f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,13 @@ import android.widget.EditText
import android.widget.TextView
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import androidx.core.widget.addTextChangedListener
import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.viewModels
import androidx.navigation.fragment.findNavController
import com.bumptech.glide.Glide
import com.project.meongcare.BuildConfig
import com.project.meongcare.MainActivity
import com.project.meongcare.R
import com.project.meongcare.aws.util.AWSS3ImageUtils
import com.project.meongcare.aws.util.PARENT_FOLDER_PATH
import com.project.meongcare.aws.util.SUPPLEMENTS_FOLDER_PATH
import com.project.meongcare.aws.viewmodel.AWSS3ViewModel
import com.project.meongcare.databinding.FragmentMedicalRecordAddBinding
import com.project.meongcare.medicalRecord.model.data.local.OnPictureChangedListener
import com.project.meongcare.medicalRecord.model.utils.MedicalRecordUtils
Expand All @@ -34,10 +28,6 @@ import com.project.meongcare.medicalRecord.view.bottomSheet.MedicalRecordPicture
import com.project.meongcare.medicalRecord.viewmodel.MedicalRecordViewModel
import com.project.meongcare.snackbar.view.CustomSnackBar
import dagger.hilt.android.AndroidEntryPoint
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.RequestBody
import okhttp3.RequestBody.Companion.asRequestBody
import java.io.File
import java.time.LocalDate
import java.time.format.DateTimeFormatter

Expand Down Expand Up @@ -165,7 +155,7 @@ class MedicalRecordAddFragment :
}
}

fun isEditTextNullOrEmpty(
private fun isEditTextNullOrEmpty(
editText: EditText,
layout: ConstraintLayout?,
textCount: TextView,
Expand Down Expand Up @@ -212,11 +202,27 @@ class MedicalRecordAddFragment :
setEditTextWatcher(editText, count, R.string.medicalrecord_hospital_name_length)
}

private fun setEditTextWatcher(editText: EditText, count: TextView, stringId: Int) {
private fun setEditTextWatcher(
editText: EditText,
count: TextView,
stringId: Int
) {
editText.addTextChangedListener(object : TextWatcher {
override fun beforeTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {}
override fun beforeTextChanged(
p0: CharSequence?,
p1: Int,
p2: Int,
p3: Int,
) {
}

override fun onTextChanged(p0: CharSequence?, p1: Int, p2: Int, p3: Int) {}
override fun onTextChanged(
p0: CharSequence?,
p1: Int,
p2: Int,
p3: Int,
) {
}

override fun afterTextChanged(p0: Editable?) {
count.text =
Expand Down Expand Up @@ -265,7 +271,7 @@ class MedicalRecordAddFragment :
)
}

fun showCalendarBottomSheet(
private fun showCalendarBottomSheet(
parentFragmentManager: FragmentManager,
onDateSelectedListener: MedicalRecordDateBottomSheetDialogFragment.OnDateSelectedListener,
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,15 @@ import androidx.lifecycle.LiveData
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.project.meongcare.aws.util.AWSS3ImageUtils
import com.project.meongcare.aws.util.PARENT_FOLDER_PATH
import com.project.meongcare.aws.util.SUPPLEMENTS_FOLDER_PATH
import com.project.meongcare.login.model.data.local.UserPreferences
import com.project.meongcare.login.view.GlobalApplication
import com.project.meongcare.medicalRecord.model.data.repository.MedicalRecordRepositoryImpl
import com.project.meongcare.medicalRecord.model.entities.MedicalRecordDto
import com.project.meongcare.medicalRecord.model.entities.MedicalRecordGet
import com.project.meongcare.medicalRecord.model.entities.MedicalRecordGetResponse
import com.project.meongcare.medicalRecord.model.entities.RequestMedicalRecord
import com.project.meongcare.medicalRecord.model.utils.MedicalRecordUtils
import com.project.meongcare.supplement.model.entities.SupplementPostRequest
import dagger.hilt.android.lifecycle.HiltViewModel
import kotlinx.coroutines.flow.first
import kotlinx.coroutines.launch
import okhttp3.MediaType.Companion.toMediaTypeOrNull
import okhttp3.RequestBody
import okhttp3.RequestBody.Companion.asRequestBody
import retrofit2.Response
import javax.inject.Inject

Expand Down

0 comments on commit 461755f

Please sign in to comment.